1 /* 2 * Copyright (c) 2007-2009 The Khronos Group Inc. 3 * 4 * Permission is hereby granted, free of charge, to any person obtaining a copy of 5 * this software and /or associated documentation files (the "Materials "), to 6 * deal in the Materials without restriction, including without limitation the 7 * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or 8 * sell copies of the Materials, and to permit persons to whom the Materials are 9 * furnished to do so, subject to 10 * the following conditions: 11 * 12 * The above copyright notice and this permission notice shall be included 13 * in all copies or substantial portions of the Materials. 14 * 15 * THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 * OUT OF OR IN CONNECTION WITH THE MATERIALS OR THE USE OR OTHER DEALINGS IN THE 21 * MATERIALS. 22 * 23 * OpenSLES.h - OpenSL ES version 1.0.1 24 * 25 */ 26 27 /****************************************************************************/ 28 /* NOTE: This file is a standard OpenSL ES header file and should not be */ 29 /* modified in any way. */ 30 /****************************************************************************/ 31 32 module opensles.sles; 33 34 extern(C): 35 36 /*****************************************************************************/ 37 /* Common types, structures, and defines */ 38 /*****************************************************************************/ 39 40 enum _KHRONOS_KEYS_ = true; 41 42 enum KHRONOS_TITLE = "KhronosTitle"; 43 enum KHRONOS_ALBUM = "KhronosAlbum"; 44 enum KHRONOS_TRACK_NUMBER = "KhronosTrackNumber"; 45 enum KHRONOS_ARTIST = "KhronosArtist"; 46 enum KHRONOS_GENRE = "KhronosGenre"; 47 enum KHRONOS_YEAR = "KhronosYear"; 48 enum KHRONOS_COMMENT = "KhronosComment"; 49 enum KHRONOS_ARTIST_URL = "KhronosArtistURL"; 50 enum KHRONOS_CONTENT_URL = "KhronosContentURL"; 51 enum KHRONOS_RATING = "KhronosRating"; 52 enum KHRONOS_ALBUM_ART = "KhronosAlbumArt"; 53 enum KHRONOS_COPYRIGHT = "KhronosCopyright"; 54 55 56 /* remap common types to SL types for clarity */ 57 alias sl_uint8_t = ubyte; 58 alias sl_int8_t = byte; 59 alias sl_uint16_t = ushort; 60 alias sl_int16_t = short; 61 alias sl_uint32_t = uint; 62 alias sl_int32_t = int; 63 alias sl_int64_t = long; 64 alias sl_uint64_t = ulong; 65 alias SLint8 = sl_int8_t; /* 8 bit signed integer */ 66 alias SLuint8 = sl_uint8_t; /* 8 bit unsigned integer */ 67 alias SLint16 = sl_int16_t; /* 16 bit signed integer */ 68 alias SLuint16 = sl_uint16_t; /* 16 bit unsigned integer */ 69 alias SLint32 = sl_int32_t; /* 32 bit signed integer */ 70 alias SLuint32 = sl_uint32_t; /* 32 bit unsigned integer */ 71 72 alias SLboolean = SLuint32; 73 enum SL_BOOLEAN_FALSE = (cast(SLboolean) 0x00000000); 74 enum SL_BOOLEAN_TRUE = (cast(SLboolean) 0x00000001); 75 76 alias SLchar = SLuint8; /* UTF-8 is to be used */ 77 alias SLmillibel = SLint16; 78 alias SLmillisecond = SLuint32; 79 alias SLmilliHertz = SLuint32; 80 alias SLmillimeter = SLint32; 81 alias SLmillidegree = SLint32; 82 alias SLpermille = SLint16; 83 alias SLmicrosecond = SLuint32; 84 alias SLresult = SLuint32; 85 86 enum SL_MILLIBEL_MAX= (cast(SLmillibel) 0x7FFF); 87 enum SL_MILLIBEL_MIN= SLmillibel.min; 88 89 enum SL_MILLIHERTZ_MAX= (cast(SLmilliHertz) 0xFFFFFFFF); 90 enum SL_MILLIMETER_MAX= (cast(SLmillimeter) 0x7FFFFFFF); 91 92 /** Interface ID defined as a UUID */ 93 struct SLInterfaceID_ { 94 SLuint32 time_low; 95 SLuint16 time_mid; 96 SLuint16 time_hi_and_version; 97 SLuint16 clock_seq; 98 SLuint8[6] node; 99 } 100 alias SLInterfaceID = SLInterfaceID_*; 101 102 /* Forward declaration for the object interface */ 103 104 105 alias SLObjectItf = const(SLObjectItf_*)*; 106 107 /* Objects ID's */ 108 109 enum SL_OBJECTID_ENGINE = (cast(SLuint32) 0x00001001); 110 enum SL_OBJECTID_LEDDEVICE = (cast(SLuint32) 0x00001002); 111 enum SL_OBJECTID_VIBRADEVICE = (cast(SLuint32) 0x00001003); 112 enum SL_OBJECTID_AUDIOPLAYER = (cast(SLuint32) 0x00001004); 113 enum SL_OBJECTID_AUDIORECORDER = (cast(SLuint32) 0x00001005); 114 enum SL_OBJECTID_MIDIPLAYER = (cast(SLuint32) 0x00001006); 115 enum SL_OBJECTID_LISTENER = (cast(SLuint32) 0x00001007); 116 enum SL_OBJECTID_3DGROUP = (cast(SLuint32) 0x00001008); 117 enum SL_OBJECTID_OUTPUTMIX = (cast(SLuint32) 0x00001009); 118 enum SL_OBJECTID_METADATAEXTRACTOR = (cast(SLuint32) 0x0000100A); 119 120 121 /* SL Profiles */ 122 123 enum SL_PROFILES_PHONE = (cast(SLuint16) 0x0001); 124 enum SL_PROFILES_MUSIC = (cast(SLuint16) 0x0002); 125 enum SL_PROFILES_GAME = (cast(SLuint16) 0x0004); 126 127 /* Types of voices supported by the system */ 128 129 enum SL_VOICETYPE_2D_AUDIO =(cast(SLuint16) 0x0001); 130 enum SL_VOICETYPE_MIDI =(cast(SLuint16) 0x0002); 131 enum SL_VOICETYPE_3D_AUDIO =(cast(SLuint16) 0x0004); 132 enum SL_VOICETYPE_3D_MIDIOUTPUT =(cast(SLuint16) 0x0008); 133 134 /* Convenient macros representing various different priority levels, for use with the SetPriority method */ 135 136 enum SL_PRIORITY_LOWEST = (cast(SLint32) (-0x7FFFFFFF-1)); 137 enum SL_PRIORITY_VERYLOW = (cast(SLint32) -0x60000000); 138 enum SL_PRIORITY_LOW = (cast(SLint32) -0x40000000); 139 enum SL_PRIORITY_BELOWNORMAL= (cast(SLint32) -0x20000000); 140 enum SL_PRIORITY_NORMAL = (cast(SLint32) 0x00000000); 141 enum SL_PRIORITY_ABOVENORMAL= (cast(SLint32) 0x20000000); 142 enum SL_PRIORITY_HIGH = (cast(SLint32) 0x40000000); 143 enum SL_PRIORITY_VERYHIGH = (cast(SLint32) 0x60000000); 144 enum SL_PRIORITY_HIGHEST = (cast(SLint32) 0x7FFFFFFF); 145 146 147 /** These macros list the various sample formats that are possible on audio input and output devices. */ 148 149 enum SL_PCMSAMPLEFORMAT_FIXED_8 = (cast(SLuint16) 0x0008); 150 enum SL_PCMSAMPLEFORMAT_FIXED_16 = (cast(SLuint16) 0x0010); 151 enum SL_PCMSAMPLEFORMAT_FIXED_20 = (cast(SLuint16) 0x0014); 152 enum SL_PCMSAMPLEFORMAT_FIXED_24 = (cast(SLuint16) 0x0018); 153 enum SL_PCMSAMPLEFORMAT_FIXED_28 = (cast(SLuint16) 0x001C); 154 enum SL_PCMSAMPLEFORMAT_FIXED_32 = (cast(SLuint16) 0x0020); 155 156 157 /** These macros specify the commonly used sampling rates (in milliHertz) supported by most audio I/O devices. */ 158 159 enum SL_SAMPLINGRATE_8 = (cast(SLuint32) 8000000); 160 enum SL_SAMPLINGRATE_11_025 = (cast(SLuint32) 11025000); 161 enum SL_SAMPLINGRATE_12 = (cast(SLuint32) 12000000); 162 enum SL_SAMPLINGRATE_16 = (cast(SLuint32) 16000000); 163 enum SL_SAMPLINGRATE_22_05 = (cast(SLuint32) 22050000); 164 enum SL_SAMPLINGRATE_24 = (cast(SLuint32) 24000000); 165 enum SL_SAMPLINGRATE_32 = (cast(SLuint32) 32000000); 166 enum SL_SAMPLINGRATE_44_1 = (cast(SLuint32) 44100000); 167 enum SL_SAMPLINGRATE_48 = (cast(SLuint32) 48000000); 168 enum SL_SAMPLINGRATE_64 = (cast(SLuint32) 64000000); 169 enum SL_SAMPLINGRATE_88_2 = (cast(SLuint32) 88200000); 170 enum SL_SAMPLINGRATE_96 = (cast(SLuint32) 96000000); 171 enum SL_SAMPLINGRATE_192 = (cast(SLuint32) 192000000); 172 173 enum SL_SPEAKER_FRONT_LEFT = (cast(SLuint32) 0x00000001); 174 enum SL_SPEAKER_FRONT_RIGHT = (cast(SLuint32) 0x00000002); 175 enum SL_SPEAKER_FRONT_CENTER = (cast(SLuint32) 0x00000004); 176 enum SL_SPEAKER_LOW_FREQUENCY = (cast(SLuint32) 0x00000008); 177 enum SL_SPEAKER_BACK_LEFT = (cast(SLuint32) 0x00000010); 178 enum SL_SPEAKER_BACK_RIGHT = (cast(SLuint32) 0x00000020); 179 enum SL_SPEAKER_FRONT_LEFT_OF_CENTER = (cast(SLuint32) 0x00000040); 180 enum SL_SPEAKER_FRONT_RIGHT_OF_CENTER= (cast(SLuint32) 0x00000080); 181 enum SL_SPEAKER_BACK_CENTER = (cast(SLuint32) 0x00000100); 182 enum SL_SPEAKER_SIDE_LEFT = (cast(SLuint32) 0x00000200); 183 enum SL_SPEAKER_SIDE_RIGHT = (cast(SLuint32) 0x00000400); 184 enum SL_SPEAKER_TOP_CENTER = (cast(SLuint32) 0x00000800); 185 enum SL_SPEAKER_TOP_FRONT_LEFT = (cast(SLuint32) 0x00001000); 186 enum SL_SPEAKER_TOP_FRONT_CENTER = (cast(SLuint32) 0x00002000); 187 enum SL_SPEAKER_TOP_FRONT_RIGHT = (cast(SLuint32) 0x00004000); 188 enum SL_SPEAKER_TOP_BACK_LEFT = (cast(SLuint32) 0x00008000); 189 enum SL_SPEAKER_TOP_BACK_CENTER = (cast(SLuint32) 0x00010000); 190 enum SL_SPEAKER_TOP_BACK_RIGHT = (cast(SLuint32) 0x00020000); 191 192 193 /*****************************************************************************/ 194 /* Errors */ 195 /* */ 196 /*****************************************************************************/ 197 198 enum SL_RESULT_SUCCESS = (cast(SLuint32) 0x00000000); 199 enum SL_RESULT_PRECONDITIONS_VIOLATED = (cast(SLuint32) 0x00000001); 200 enum SL_RESULT_PARAMETER_INVALID = (cast(SLuint32) 0x00000002); 201 enum SL_RESULT_MEMORY_FAILURE = (cast(SLuint32) 0x00000003); 202 enum SL_RESULT_RESOURCE_ERROR = (cast(SLuint32) 0x00000004); 203 enum SL_RESULT_RESOURCE_LOST = (cast(SLuint32) 0x00000005); 204 enum SL_RESULT_IO_ERROR = (cast(SLuint32) 0x00000006); 205 enum SL_RESULT_BUFFER_INSUFFICIENT = (cast(SLuint32) 0x00000007); 206 enum SL_RESULT_CONTENT_CORRUPTED = (cast(SLuint32) 0x00000008); 207 enum SL_RESULT_CONTENT_UNSUPPORTED = (cast(SLuint32) 0x00000009); 208 enum SL_RESULT_CONTENT_NOT_FOUND = (cast(SLuint32) 0x0000000A); 209 enum SL_RESULT_PERMISSION_DENIED = (cast(SLuint32) 0x0000000B); 210 enum SL_RESULT_FEATURE_UNSUPPORTED = (cast(SLuint32) 0x0000000C); 211 enum SL_RESULT_INTERNAL_ERROR = (cast(SLuint32) 0x0000000D); 212 enum SL_RESULT_UNKNOWN_ERROR = (cast(SLuint32) 0x0000000E); 213 enum SL_RESULT_OPERATION_ABORTED = (cast(SLuint32) 0x0000000F); 214 enum SL_RESULT_CONTROL_LOST = (cast(SLuint32) 0x00000010); 215 216 217 /* Object state definitions */ 218 219 enum SL_OBJECT_STATE_UNREALIZED = (cast(SLuint32) 0x00000001); 220 enum SL_OBJECT_STATE_REALIZED = (cast(SLuint32) 0x00000002); 221 enum SL_OBJECT_STATE_SUSPENDED = (cast(SLuint32) 0x00000003); 222 223 /* Object event definitions */ 224 225 enum SL_OBJECT_EVENT_RUNTIME_ERROR = (cast(SLuint32) 0x00000001); 226 enum SL_OBJECT_EVENT_ASYNC_TERMINATION = (cast(SLuint32) 0x00000002); 227 enum SL_OBJECT_EVENT_RESOURCES_LOST = (cast(SLuint32) 0x00000003); 228 enum SL_OBJECT_EVENT_RESOURCES_AVAILABLE = (cast(SLuint32) 0x00000004); 229 enum SL_OBJECT_EVENT_ITF_CONTROL_TAKEN = (cast(SLuint32) 0x00000005); 230 enum SL_OBJECT_EVENT_ITF_CONTROL_RETURNED = (cast(SLuint32) 0x00000006); 231 enum SL_OBJECT_EVENT_ITF_PARAMETERS_CHANGED = (cast(SLuint32) 0x00000007); 232 233 234 /*****************************************************************************/ 235 /* Interface definitions */ 236 /*****************************************************************************/ 237 238 /** NULL Interface */ 239 240 extern const(SLInterfaceID) SL_IID_NULL; 241 242 /*---------------------------------------------------------------------------*/ 243 /* Data Source and Data Sink Structures */ 244 /*---------------------------------------------------------------------------*/ 245 246 /** Data locator macros */ 247 enum SL_DATALOCATOR_URI = (cast(SLuint32) 0x00000001); 248 enum SL_DATALOCATOR_ADDRESS = (cast(SLuint32) 0x00000002); 249 enum SL_DATALOCATOR_IODEVICE = (cast(SLuint32) 0x00000003); 250 enum SL_DATALOCATOR_OUTPUTMIX = (cast(SLuint32) 0x00000004); 251 enum SL_DATALOCATOR_RESERVED5 = (cast(SLuint32) 0x00000005); 252 enum SL_DATALOCATOR_BUFFERQUEUE = (cast(SLuint32) 0x00000006); 253 enum SL_DATALOCATOR_MIDIBUFFERQUEUE = (cast(SLuint32) 0x00000007); 254 enum SL_DATALOCATOR_RESERVED8 = (cast(SLuint32) 0x00000008); 255 256 257 258 /** URI-based data locator definition where locatorType must be SL_DATALOCATOR_URI*/ 259 struct SLDataLocator_URI_ { 260 SLuint32 locatorType; 261 SLchar * URI; 262 } 263 264 alias SLDataLocator_URI = SLDataLocator_URI_; 265 266 /** Address-based data locator definition where locatorType must be SL_DATALOCATOR_ADDRESS*/ 267 struct SLDataLocator_Address_ { 268 SLuint32 locatorType; 269 void *pAddress; 270 SLuint32 length; 271 } 272 alias SLDataLocator_Address = SLDataLocator_Address_; 273 274 /** IODevice-types */ 275 enum SL_IODEVICE_AUDIOINPUT = (cast(SLuint32) 0x00000001); 276 enum SL_IODEVICE_LEDARRAY = (cast(SLuint32) 0x00000002); 277 enum SL_IODEVICE_VIBRA = (cast(SLuint32) 0x00000003); 278 enum SL_IODEVICE_RESERVED4 = (cast(SLuint32) 0x00000004); 279 enum SL_IODEVICE_RESERVED5 = (cast(SLuint32) 0x00000005); 280 281 /** IODevice-based data locator definition where locatorType must be SL_DATALOCATOR_IODEVICE*/ 282 struct SLDataLocator_IODevice_ { 283 SLuint32 locatorType; 284 SLuint32 deviceType; 285 SLuint32 deviceID; 286 SLObjectItf device; 287 } 288 289 alias SLDataLocator_IODevice = SLDataLocator_IODevice_; 290 291 /** OutputMix-based data locator definition where locatorType must be SL_DATALOCATOR_OUTPUTMIX*/ 292 struct SLDataLocator_OutputMix { 293 SLuint32 locatorType; 294 SLObjectItf outputMix; 295 } 296 297 298 /** BufferQueue-based data locator definition where locatorType must be SL_DATALOCATOR_BUFFERQUEUE*/ 299 struct SLDataLocator_BufferQueue { 300 SLuint32 locatorType; 301 SLuint32 numBuffers; 302 } 303 304 /** MidiBufferQueue-based data locator definition where locatorType must be SL_DATALOCATOR_MIDIBUFFERQUEUE*/ 305 struct SLDataLocator_MIDIBufferQueue { 306 SLuint32 locatorType; 307 SLuint32 tpqn; 308 SLuint32 numBuffers; 309 } 310 311 /** Data format defines */ 312 enum SL_DATAFORMAT_MIME = (cast(SLuint32) 0x00000001); 313 enum SL_DATAFORMAT_PCM = (cast(SLuint32) 0x00000002); 314 enum SL_DATAFORMAT_RESERVED3 = (cast(SLuint32) 0x00000003); 315 316 317 /** MIME-type-based data format definition where formatType must be SL_DATAFORMAT_MIME*/ 318 struct SLDataFormat_MIME_ { 319 SLuint32 formatType; 320 SLchar * mimeType; 321 SLuint32 containerType; 322 } 323 alias SLDataFormat_MIME = SLDataFormat_MIME_; 324 325 /* Byte order of a block of 16- or 32-bit data */ 326 enum SL_BYTEORDER_BIGENDIAN = (cast(SLuint32) 0x00000001); 327 enum SL_BYTEORDER_LITTLEENDIAN = (cast(SLuint32) 0x00000002); 328 329 /* Container type */ 330 enum SL_CONTAINERTYPE_UNSPECIFIED = (cast(SLuint32) 0x00000001); 331 enum SL_CONTAINERTYPE_RAW = (cast(SLuint32) 0x00000002); 332 enum SL_CONTAINERTYPE_ASF = (cast(SLuint32) 0x00000003); 333 enum SL_CONTAINERTYPE_AVI = (cast(SLuint32) 0x00000004); 334 enum SL_CONTAINERTYPE_BMP = (cast(SLuint32) 0x00000005); 335 enum SL_CONTAINERTYPE_JPG = (cast(SLuint32) 0x00000006); 336 enum SL_CONTAINERTYPE_JPG2000 = (cast(SLuint32) 0x00000007); 337 enum SL_CONTAINERTYPE_M4A = (cast(SLuint32) 0x00000008); 338 enum SL_CONTAINERTYPE_MP3 = (cast(SLuint32) 0x00000009); 339 enum SL_CONTAINERTYPE_MP4 = (cast(SLuint32) 0x0000000A); 340 enum SL_CONTAINERTYPE_MPEG_ES = (cast(SLuint32) 0x0000000B); 341 enum SL_CONTAINERTYPE_MPEG_PS = (cast(SLuint32) 0x0000000C); 342 enum SL_CONTAINERTYPE_MPEG_TS = (cast(SLuint32) 0x0000000D); 343 enum SL_CONTAINERTYPE_QT = (cast(SLuint32) 0x0000000E); 344 enum SL_CONTAINERTYPE_WAV = (cast(SLuint32) 0x0000000F); 345 enum SL_CONTAINERTYPE_XMF_0 = (cast(SLuint32) 0x00000010); 346 enum SL_CONTAINERTYPE_XMF_1 = (cast(SLuint32) 0x00000011); 347 enum SL_CONTAINERTYPE_XMF_2 = (cast(SLuint32) 0x00000012); 348 enum SL_CONTAINERTYPE_XMF_3 = (cast(SLuint32) 0x00000013); 349 enum SL_CONTAINERTYPE_XMF_GENERIC = (cast(SLuint32) 0x00000014); 350 enum SL_CONTAINERTYPE_AMR = (cast(SLuint32) 0x00000015); 351 enum SL_CONTAINERTYPE_AAC = (cast(SLuint32) 0x00000016); 352 enum SL_CONTAINERTYPE_3GPP = (cast(SLuint32) 0x00000017); 353 enum SL_CONTAINERTYPE_3GA = (cast(SLuint32) 0x00000018); 354 enum SL_CONTAINERTYPE_RM = (cast(SLuint32) 0x00000019); 355 enum SL_CONTAINERTYPE_DMF = (cast(SLuint32) 0x0000001A); 356 enum SL_CONTAINERTYPE_SMF = (cast(SLuint32) 0x0000001B); 357 enum SL_CONTAINERTYPE_MOBILE_DLS = (cast(SLuint32) 0x0000001C); 358 enum SL_CONTAINERTYPE_OGG = (cast(SLuint32) 0x0000001D); 359 360 361 /** PCM-type-based data format definition where formatType must be SL_DATAFORMAT_PCM*/ 362 struct SLDataFormat_PCM_ { 363 SLuint32 formatType; 364 SLuint32 numChannels; 365 SLuint32 samplesPerSec; 366 SLuint32 bitsPerSample; 367 SLuint32 containerSize; 368 SLuint32 channelMask; 369 SLuint32 endianness; 370 } 371 alias SLDataFormat_PCM = SLDataFormat_PCM_; 372 373 struct SLDataSource_ { 374 void *pLocator; 375 void *pFormat; 376 } 377 alias SLDataSource = SLDataSource_; 378 379 380 struct SLDataSink_ { 381 void *pLocator; 382 void *pFormat; 383 } 384 alias SLDataSink = SLDataSink_; 385 386 387 388 /*---------------------------------------------------------------------------*/ 389 /* Standard Object Interface */ 390 /*---------------------------------------------------------------------------*/ 391 392 extern const(SLInterfaceID) SL_IID_OBJECT; 393 394 /** Object callback */ 395 396 397 alias slObjectCallback = void function ( 398 SLObjectItf caller, 399 const void * pContext, 400 SLuint32 event, 401 SLresult result, 402 SLuint32 param, 403 void *pInterface 404 ); 405 406 407 struct SLObjectItf_ { 408 SLresult function( 409 SLObjectItf self, 410 SLboolean async 411 ) Realize; 412 SLresult function ( 413 SLObjectItf self, 414 SLboolean async 415 ) Resume; 416 SLresult function ( 417 SLObjectItf self, 418 SLuint32 * pState 419 ) GetState; 420 SLresult function ( 421 SLObjectItf self, 422 const SLInterfaceID iid, 423 void * pInterface 424 ) GetInterface; 425 SLresult function ( 426 SLObjectItf self, 427 slObjectCallback callback, 428 void * pContext 429 ) RegisterCallback; 430 void function ( 431 SLObjectItf self 432 ) AbortAsyncOperation; 433 void function ( 434 SLObjectItf self 435 ) Destroy; 436 SLresult function ( 437 SLObjectItf self, 438 SLint32 priority, 439 SLboolean preemptable 440 ) SetPriority; 441 SLresult function ( 442 SLObjectItf self, 443 SLint32 *pPriority, 444 SLboolean *pPreemptable 445 ) GetPriority; 446 SLresult function ( 447 SLObjectItf self, 448 SLint16 numInterfaces, 449 SLInterfaceID * pInterfaceIDs, 450 SLboolean enabled 451 ) SetLossOfControlInterfaces; 452 }; 453 454 455 /*---------------------------------------------------------------------------*/ 456 /* Audio IO Device capabilities interface */ 457 /*---------------------------------------------------------------------------*/ 458 459 enum SL_DEFAULTDEVICEID_AUDIOINPUT = (cast(SLuint32) 0xFFFFFFFF); 460 enum SL_DEFAULTDEVICEID_AUDIOOUTPUT = (cast(SLuint32) 0xFFFFFFFE); 461 enum SL_DEFAULTDEVICEID_LED = (cast(SLuint32) 0xFFFFFFFD); 462 enum SL_DEFAULTDEVICEID_VIBRA = (cast(SLuint32) 0xFFFFFFFC); 463 enum SL_DEFAULTDEVICEID_RESERVED1 = (cast(SLuint32) 0xFFFFFFFB); 464 465 466 enum SL_DEVCONNECTION_INTEGRATED = (cast(SLint16) 0x0001); 467 enum SL_DEVCONNECTION_ATTACHED_WIRED = (cast(SLint16) 0x0100); 468 enum SL_DEVCONNECTION_ATTACHED_WIRELESS = (cast(SLint16) 0x0200); 469 enum SL_DEVCONNECTION_NETWORK = (cast(SLint16) 0x0400); 470 471 472 enum SL_DEVLOCATION_HANDSET = (cast(SLuint16) 0x0001); 473 enum SL_DEVLOCATION_HEADSET = (cast(SLuint16) 0x0002); 474 enum SL_DEVLOCATION_CARKIT = (cast(SLuint16) 0x0003); 475 enum SL_DEVLOCATION_DOCK = (cast(SLuint16) 0x0004); 476 enum SL_DEVLOCATION_REMOTE = (cast(SLuint16) 0x0005); 477 /* Note: SL_DEVLOCATION_RESLTE is deprecated, use SL_DEVLOCATION_REMOTE instead. */ 478 enum SL_DEVLOCATION_RESLTE = (cast(SLuint16) 0x0005); 479 480 481 enum SL_DEVSCOPE_UNKNOWN = (cast(SLuint16) 0x0001); 482 enum SL_DEVSCOPE_ENVIRONMENT = (cast(SLuint16) 0x0002); 483 enum SL_DEVSCOPE_USER = (cast(SLuint16) 0x0003); 484 485 486 struct SLAudioInputDescriptor_ { 487 SLchar *deviceName; 488 SLint16 deviceConnection; 489 SLint16 deviceScope; 490 SLint16 deviceLocation; 491 SLboolean isForTelephony; 492 SLmilliHertz minSampleRate; 493 SLmilliHertz maxSampleRate; 494 SLboolean isFreqRangeContinuous; 495 SLmilliHertz *samplingRatesSupported; 496 SLint16 numOfSamplingRatesSupported; 497 SLint16 maxChannels; 498 } 499 alias SLAudioInputDescriptor = SLAudioInputDescriptor_; 500 501 502 struct SLAudioOutputDescriptor_ { 503 SLchar *pDeviceName; 504 SLint16 deviceConnection; 505 SLint16 deviceScope; 506 SLint16 deviceLocation; 507 SLboolean isForTelephony; 508 SLmilliHertz minSampleRate; 509 SLmilliHertz maxSampleRate; 510 SLboolean isFreqRangeContinuous; 511 SLmilliHertz *samplingRatesSupported; 512 SLint16 numOfSamplingRatesSupported; 513 SLint16 maxChannels; 514 } 515 alias SLAudioOutputDescriptor = SLAudioOutputDescriptor_; 516 517 518 519 extern const(SLInterfaceID) SL_IID_AUDIOIODEVICECAPABILITIES; 520 521 522 alias SLAudioIODeviceCapabilitiesItf = const(SLAudioIODeviceCapabilitiesItf_*)*; 523 524 525 alias slAvailableAudioInputsChangedCallback = void function ( 526 SLAudioIODeviceCapabilitiesItf caller, 527 void *pContext, 528 SLuint32 deviceID, 529 SLint32 numInputs, 530 SLboolean isNew 531 ); 532 533 534 alias slAvailableAudioOutputsChangedCallback = void function ( 535 SLAudioIODeviceCapabilitiesItf caller, 536 void *pContext, 537 SLuint32 deviceID, 538 SLint32 numOutputs, 539 SLboolean isNew 540 ); 541 542 alias slDefaultDeviceIDMapChangedCallback = void function ( 543 SLAudioIODeviceCapabilitiesItf caller, 544 void *pContext, 545 SLboolean isOutput, 546 SLint32 numDevices 547 ); 548 549 550 struct SLAudioIODeviceCapabilitiesItf_ { 551 SLresult function ( 552 SLAudioIODeviceCapabilitiesItf self, 553 SLint32 *pNumInputs, 554 SLuint32 *pInputDeviceIDs 555 ) GetAvailableAudioInputs; 556 SLresult function ( 557 SLAudioIODeviceCapabilitiesItf self, 558 SLuint32 deviceId, 559 SLAudioInputDescriptor *pDescriptor 560 ) QueryAudioInputCapabilities; 561 SLresult function ( 562 SLAudioIODeviceCapabilitiesItf self, 563 slAvailableAudioInputsChangedCallback callback, 564 void *pContext 565 ) RegisterAvailableAudioInputsChangedCallback; 566 SLresult function ( 567 SLAudioIODeviceCapabilitiesItf self, 568 SLint32 *pNumOutputs, 569 SLuint32 *pOutputDeviceIDs 570 ) GetAvailableAudioOutputs; 571 SLresult function ( 572 SLAudioIODeviceCapabilitiesItf self, 573 SLuint32 deviceId, 574 SLAudioOutputDescriptor *pDescriptor 575 ) QueryAudioOutputCapabilities; 576 SLresult function ( 577 SLAudioIODeviceCapabilitiesItf self, 578 slAvailableAudioOutputsChangedCallback callback, 579 void *pContext 580 ) RegisterAvailableAudioOutputsChangedCallback; 581 SLresult function ( 582 SLAudioIODeviceCapabilitiesItf self, 583 slDefaultDeviceIDMapChangedCallback callback, 584 void *pContext 585 ) RegisterDefaultDeviceIDMapChangedCallback; 586 SLresult function ( 587 SLAudioIODeviceCapabilitiesItf self, 588 SLuint32 deviceId, 589 SLint32 *pNumAudioInputs, 590 SLuint32 *pAudioInputDeviceIDs 591 ) GetAssociatedAudioInputs; 592 SLresult function ( 593 SLAudioIODeviceCapabilitiesItf self, 594 SLuint32 deviceId, 595 SLint32 *pNumAudioOutputs, 596 SLuint32 *pAudioOutputDeviceIDs 597 ) GetAssociatedAudioOutputs; 598 SLresult function ( 599 SLAudioIODeviceCapabilitiesItf self, 600 SLuint32 defaultDeviceID, 601 SLint32 *pNumAudioDevices, 602 SLuint32 *pAudioDeviceIDs 603 ) GetDefaultAudioDevices; 604 SLresult function ( 605 SLAudioIODeviceCapabilitiesItf self, 606 SLuint32 deviceId, 607 SLmilliHertz samplingRate, 608 SLint32 *pSampleFormats, 609 SLint32 *pNumOfSampleFormats 610 ) QuerySampleFormatsSupported; 611 }; 612 613 614 615 /*---------------------------------------------------------------------------*/ 616 /* Capabilities of the LED array IODevice */ 617 /*---------------------------------------------------------------------------*/ 618 619 struct SLLEDDescriptor_ { 620 SLuint8 ledCount; 621 SLuint8 primaryLED; 622 SLuint32 colorMask; 623 } 624 alias SLLEDDescriptor = SLLEDDescriptor_; 625 626 627 /*---------------------------------------------------------------------------*/ 628 /* LED Array interface */ 629 /*---------------------------------------------------------------------------*/ 630 631 struct SLHSL_ { 632 SLmillidegree hue; 633 SLpermille saturation; 634 SLpermille lightness; 635 } 636 alias SLHSL = SLHSL_; 637 638 639 extern const(SLInterfaceID) SL_IID_LED; 640 641 642 alias SLLEDArrayItf = const(SLLEDArrayItf_*)*; 643 644 struct SLLEDArrayItf_ { 645 SLresult function ( 646 SLLEDArrayItf self, 647 SLuint32 lightMask 648 ) ActivateLEDArray; 649 SLresult function ( 650 SLLEDArrayItf self, 651 SLuint32 *lightMask 652 ) IsLEDArrayActivated; 653 SLresult function ( 654 SLLEDArrayItf self, 655 SLuint8 index, 656 const SLHSL *color 657 ) SetColor; 658 SLresult function ( 659 SLLEDArrayItf self, 660 SLuint8 index, 661 SLHSL *color 662 ) GetColor; 663 }; 664 665 /*---------------------------------------------------------------------------*/ 666 /* Capabilities of the Vibra IODevice */ 667 /*---------------------------------------------------------------------------*/ 668 669 struct SLVibraDescriptor_ { 670 SLboolean supportsFrequency; 671 SLboolean supportsIntensity; 672 SLmilliHertz minFrequency; 673 SLmilliHertz maxFrequency; 674 } 675 alias SLVibraDescriptor = SLVibraDescriptor_; 676 677 678 679 /*---------------------------------------------------------------------------*/ 680 /* Vibra interface */ 681 /*---------------------------------------------------------------------------*/ 682 683 684 extern const(SLInterfaceID) SL_IID_VIBRA; 685 686 687 688 alias SLVibraItf = const(SLVibraItf_*)*; 689 690 struct SLVibraItf_ { 691 SLresult function ( 692 SLVibraItf self, 693 SLboolean vibrate 694 ) Vibrate; 695 SLresult function ( 696 SLVibraItf self, 697 SLboolean *pVibrating 698 ) IsVibrating; 699 SLresult function ( 700 SLVibraItf self, 701 SLmilliHertz frequency 702 ) SetFrequency; 703 SLresult function ( 704 SLVibraItf self, 705 SLmilliHertz *pFrequency 706 ) GetFrequency; 707 SLresult function ( 708 SLVibraItf self, 709 SLpermille intensity 710 ) SetIntensity; 711 SLresult function ( 712 SLVibraItf self, 713 SLpermille *pIntensity 714 ) GetIntensity; 715 } 716 717 718 /*---------------------------------------------------------------------------*/ 719 /* Meta data extraction related types and interface */ 720 /*---------------------------------------------------------------------------*/ 721 722 enum SL_CHARACTERENCODING_UNKNOWN = (cast(SLuint32) 0x00000000); 723 enum SL_CHARACTERENCODING_BINARY = (cast(SLuint32) 0x00000001); 724 enum SL_CHARACTERENCODING_ASCII = (cast(SLuint32) 0x00000002); 725 enum SL_CHARACTERENCODING_BIG5 = (cast(SLuint32) 0x00000003); 726 enum SL_CHARACTERENCODING_CODEPAGE1252 = (cast(SLuint32) 0x00000004); 727 enum SL_CHARACTERENCODING_GB2312 = (cast(SLuint32) 0x00000005); 728 enum SL_CHARACTERENCODING_HZGB2312 = (cast(SLuint32) 0x00000006); 729 enum SL_CHARACTERENCODING_GB12345 = (cast(SLuint32) 0x00000007); 730 enum SL_CHARACTERENCODING_GB18030 = (cast(SLuint32) 0x00000008); 731 enum SL_CHARACTERENCODING_GBK = (cast(SLuint32) 0x00000009); 732 enum SL_CHARACTERENCODING_IMAPUTF7 = (cast(SLuint32) 0x0000000A); 733 enum SL_CHARACTERENCODING_ISO2022JP = (cast(SLuint32) 0x0000000B); 734 enum SL_CHARACTERENCODING_ISO2022JP1 = (cast(SLuint32) 0x0000000B); 735 enum SL_CHARACTERENCODING_ISO88591 = (cast(SLuint32) 0x0000000C); 736 enum SL_CHARACTERENCODING_ISO885910 = (cast(SLuint32) 0x0000000D); 737 enum SL_CHARACTERENCODING_ISO885913 = (cast(SLuint32) 0x0000000E); 738 enum SL_CHARACTERENCODING_ISO885914 = (cast(SLuint32) 0x0000000F); 739 enum SL_CHARACTERENCODING_ISO885915 = (cast(SLuint32) 0x00000010); 740 enum SL_CHARACTERENCODING_ISO88592 = (cast(SLuint32) 0x00000011); 741 enum SL_CHARACTERENCODING_ISO88593 = (cast(SLuint32) 0x00000012); 742 enum SL_CHARACTERENCODING_ISO88594 = (cast(SLuint32) 0x00000013); 743 enum SL_CHARACTERENCODING_ISO88595 = (cast(SLuint32) 0x00000014); 744 enum SL_CHARACTERENCODING_ISO88596 = (cast(SLuint32) 0x00000015); 745 enum SL_CHARACTERENCODING_ISO88597 = (cast(SLuint32) 0x00000016); 746 enum SL_CHARACTERENCODING_ISO88598 = (cast(SLuint32) 0x00000017); 747 enum SL_CHARACTERENCODING_ISO88599 = (cast(SLuint32) 0x00000018); 748 enum SL_CHARACTERENCODING_ISOEUCJP = (cast(SLuint32) 0x00000019); 749 enum SL_CHARACTERENCODING_SHIFTJIS = (cast(SLuint32) 0x0000001A); 750 enum SL_CHARACTERENCODING_SMS7BIT = (cast(SLuint32) 0x0000001B); 751 enum SL_CHARACTERENCODING_UTF7 = (cast(SLuint32) 0x0000001C); 752 enum SL_CHARACTERENCODING_UTF8 = (cast(SLuint32) 0x0000001D); 753 enum SL_CHARACTERENCODING_JAVACONFORMANTUTF8 = (cast(SLuint32) 0x0000001E); 754 enum SL_CHARACTERENCODING_UTF16BE = (cast(SLuint32) 0x0000001F); 755 enum SL_CHARACTERENCODING_UTF16LE = (cast(SLuint32) 0x00000020); 756 757 758 enum SL_METADATA_FILTER_KEY = (cast(SLuint8) 0x01); 759 enum SL_METADATA_FILTER_LANG = (cast(SLuint8) 0x02); 760 enum SL_METADATA_FILTER_ENCODING = (cast(SLuint8) 0x04); 761 762 763 struct SLMetadataInfo_ { 764 SLuint32 size; 765 SLuint32 encoding; 766 SLchar[16] langCountry; 767 SLuint8[1] data; 768 } 769 770 alias SLMetadataInfo = SLMetadataInfo_; 771 772 extern const(SLInterfaceID) SL_IID_METADATAEXTRACTION; 773 774 775 alias SLMetadataExtractionItf = const(SLMetadataExtractionItf_*)*; 776 777 778 struct SLMetadataExtractionItf_ { 779 SLresult function ( 780 SLMetadataExtractionItf self, 781 SLuint32 *pItemCount 782 ) GetItemCount; 783 SLresult function ( 784 SLMetadataExtractionItf self, 785 SLuint32 index, 786 SLuint32 *pKeySize 787 ) GetKeySize; 788 SLresult function ( 789 SLMetadataExtractionItf self, 790 SLuint32 index, 791 SLuint32 keySize, 792 SLMetadataInfo *pKey 793 ) GetKey; 794 SLresult function ( 795 SLMetadataExtractionItf self, 796 SLuint32 index, 797 SLuint32 *pValueSize 798 ) GetValueSize; 799 SLresult function ( 800 SLMetadataExtractionItf self, 801 SLuint32 index, 802 SLuint32 valueSize, 803 SLMetadataInfo *pValue 804 ) GetValue; 805 SLresult function ( 806 SLMetadataExtractionItf self, 807 SLuint32 keySize, 808 const void *pKey, 809 SLuint32 keyEncoding, 810 const SLchar *pValueLangCountry, 811 SLuint32 valueEncoding, 812 SLuint8 filterMask 813 ) AddKeyFilter; 814 SLresult function ( 815 SLMetadataExtractionItf self 816 ) ClearKeyFilter; 817 } 818 819 820 /*---------------------------------------------------------------------------*/ 821 /* Meta data traversal related types and interface */ 822 /*---------------------------------------------------------------------------*/ 823 824 enum SL_METADATATRAVERSALMODE_ALL = (cast(SLuint32) 0x00000001); 825 enum SL_METADATATRAVERSALMODE_NODE = (cast(SLuint32) 0x00000002); 826 827 828 enum SL_NODETYPE_UNSPECIFIED = (cast(SLuint32) 0x00000001); 829 enum SL_NODETYPE_AUDIO = (cast(SLuint32) 0x00000002); 830 enum SL_NODETYPE_VIDEO = (cast(SLuint32) 0x00000003); 831 enum SL_NODETYPE_IMAGE = (cast(SLuint32) 0x00000004); 832 833 enum SL_NODE_PARENT = 0xFFFFFFFF; 834 835 extern const(SLInterfaceID) SL_IID_METADATATRAVERSAL; 836 837 838 alias SLMetadataTraversalItf = const(SLMetadataTraversalItf_*)*; 839 840 struct SLMetadataTraversalItf_ { 841 SLresult function ( 842 SLMetadataTraversalItf self, 843 SLuint32 mode 844 ) SetMode; 845 SLresult function ( 846 SLMetadataTraversalItf self, 847 SLuint32 *pCount 848 ) GetChildCount; 849 SLresult function ( 850 SLMetadataTraversalItf self, 851 SLuint32 index, 852 SLuint32 *pSize 853 ) GetChildMIMETypeSize; 854 SLresult function ( 855 SLMetadataTraversalItf self, 856 SLuint32 index, 857 SLint32 *pNodeID, 858 SLuint32 *pType, 859 SLuint32 size, 860 SLchar *pMimeType 861 ) GetChildInfo; 862 SLresult function ( 863 SLMetadataTraversalItf self, 864 SLuint32 index 865 ) SetActiveNode; 866 } 867 868 /*---------------------------------------------------------------------------*/ 869 /* Dynamic Source types and interface */ 870 /*---------------------------------------------------------------------------*/ 871 872 extern const(SLInterfaceID) SL_IID_DYNAMICSOURCE; 873 874 875 alias SLDynamicSourceItf = const(SLDynamicSourceItf_*)*; 876 877 struct SLDynamicSourceItf_ { 878 SLresult function ( 879 SLDynamicSourceItf self, 880 SLDataSource *pDataSource 881 ) SetSource; 882 } 883 884 /*---------------------------------------------------------------------------*/ 885 /* Output Mix interface */ 886 /*---------------------------------------------------------------------------*/ 887 888 extern const(SLInterfaceID) SL_IID_OUTPUTMIX; 889 890 891 alias SLOutputMixItf = const(SLOutputMixItf_*)*; 892 893 alias slMixDeviceChangeCallback = void function( 894 SLOutputMixItf caller, 895 void *pContext 896 ); 897 898 899 struct SLOutputMixItf_ { 900 SLresult function ( 901 SLOutputMixItf self, 902 SLint32 *pNumDevices, 903 SLuint32 *pDeviceIDs 904 ) GetDestinationOutputDeviceIDs; 905 SLresult function ( 906 SLOutputMixItf self, 907 slMixDeviceChangeCallback callback, 908 void *pContext 909 ) RegisterDeviceChangeCallback; 910 SLresult function ( 911 SLOutputMixItf self, 912 SLint32 numOutputDevices, 913 SLuint32 *pOutputDeviceIDs 914 ) ReRoute; 915 }; 916 917 918 /*---------------------------------------------------------------------------*/ 919 /* Playback interface */ 920 /*---------------------------------------------------------------------------*/ 921 922 /** Playback states */ 923 enum SL_PLAYSTATE_STOPPED = (cast(SLuint32) 0x00000001); 924 enum SL_PLAYSTATE_PAUSED = (cast(SLuint32) 0x00000002); 925 enum SL_PLAYSTATE_PLAYING = (cast(SLuint32) 0x00000003); 926 927 /** Play events **/ 928 enum SL_PLAYEVENT_HEADATEND = (cast(SLuint32) 0x00000001); 929 enum SL_PLAYEVENT_HEADATMARKER = (cast(SLuint32) 0x00000002); 930 enum SL_PLAYEVENT_HEADATNEWPOS = (cast(SLuint32) 0x00000004); 931 enum SL_PLAYEVENT_HEADMOVING = (cast(SLuint32) 0x00000008); 932 enum SL_PLAYEVENT_HEADSTALLED = (cast(SLuint32) 0x00000010); 933 934 enum SL_TIME_UNKNOWN = (cast(SLuint32) 0xFFFFFFFF); 935 936 937 extern const(SLInterfaceID) SL_IID_PLAY; 938 939 /** Playback interface methods */ 940 941 942 alias SLPlayItf = const(SLPlayItf_*)*; 943 944 alias slPlayCallback = void function( 945 SLPlayItf caller, 946 void *pContext, 947 SLuint32 event 948 ); 949 950 struct SLPlayItf_ { 951 SLresult function ( 952 SLPlayItf self, 953 SLuint32 state 954 ) SetPlayState; 955 SLresult function ( 956 SLPlayItf self, 957 SLuint32 *pState 958 ) GetPlayState; 959 SLresult function ( 960 SLPlayItf self, 961 SLmillisecond *pMsec 962 ) GetDuration; 963 SLresult function ( 964 SLPlayItf self, 965 SLmillisecond *pMsec 966 ) GetPosition; 967 SLresult function ( 968 SLPlayItf self, 969 slPlayCallback callback, 970 void *pContext 971 ) RegisterCallback; 972 SLresult function ( 973 SLPlayItf self, 974 SLuint32 eventFlags 975 ) SetCallbackEventsMask; 976 SLresult function ( 977 SLPlayItf self, 978 SLuint32 *pEventFlags 979 ) GetCallbackEventsMask; 980 SLresult function ( 981 SLPlayItf self, 982 SLmillisecond mSec 983 ) SetMarkerPosition; 984 SLresult function ( 985 SLPlayItf self 986 ) ClearMarkerPosition; 987 SLresult function ( 988 SLPlayItf self, 989 SLmillisecond *pMsec 990 ) GetMarkerPosition; 991 SLresult function ( 992 SLPlayItf self, 993 SLmillisecond mSec 994 ) SetPositionUpdatePeriod; 995 SLresult function ( 996 SLPlayItf self, 997 SLmillisecond *pMsec 998 ) GetPositionUpdatePeriod; 999 } 1000 1001 /*---------------------------------------------------------------------------*/ 1002 /* Prefetch status interface */ 1003 /*---------------------------------------------------------------------------*/ 1004 1005 enum SL_PREFETCHEVENT_STATUSCHANGE = (cast(SLuint32) 0x00000001); 1006 enum SL_PREFETCHEVENT_FILLLEVELCHANGE = (cast(SLuint32) 0x00000002); 1007 1008 enum SL_PREFETCHSTATUS_UNDERFLOW = (cast(SLuint32) 0x00000001); 1009 enum SL_PREFETCHSTATUS_SUFFICIENTDATA = (cast(SLuint32) 0x00000002); 1010 enum SL_PREFETCHSTATUS_OVERFLOW = (cast(SLuint32) 0x00000003); 1011 1012 1013 extern const(SLInterfaceID) SL_IID_PREFETCHSTATUS; 1014 1015 1016 /** Prefetch status interface methods */ 1017 1018 1019 alias SLPrefetchStatusItf = const(SLPrefetchStatusItf_*)*; 1020 1021 alias slPrefetchCallback = void function ( 1022 SLPrefetchStatusItf caller, 1023 void *pContext, 1024 SLuint32 event 1025 ); 1026 1027 struct SLPrefetchStatusItf_ { 1028 SLresult function ( 1029 SLPrefetchStatusItf self, 1030 SLuint32 *pStatus 1031 ) GetPrefetchStatus; 1032 SLresult function ( 1033 SLPrefetchStatusItf self, 1034 SLpermille *pLevel 1035 ) GetFillLevel; 1036 SLresult function ( 1037 SLPrefetchStatusItf self, 1038 slPrefetchCallback callback, 1039 void *pContext 1040 ) RegisterCallback; 1041 SLresult function ( 1042 SLPrefetchStatusItf self, 1043 SLuint32 eventFlags 1044 ) SetCallbackEventsMask; 1045 SLresult function ( 1046 SLPrefetchStatusItf self, 1047 SLuint32 *pEventFlags 1048 ) GetCallbackEventsMask; 1049 SLresult function ( 1050 SLPrefetchStatusItf self, 1051 SLpermille period 1052 ) SetFillUpdatePeriod; 1053 SLresult function ( 1054 SLPrefetchStatusItf self, 1055 SLpermille *pPeriod 1056 ) GetFillUpdatePeriod; 1057 } 1058 1059 /*---------------------------------------------------------------------------*/ 1060 /* Playback Rate interface */ 1061 /*---------------------------------------------------------------------------*/ 1062 1063 enum SL_RATEPROP_RESERVED1 = (cast(SLuint32) 0x00000001); 1064 enum SL_RATEPROP_RESERVED2 = (cast(SLuint32) 0x00000002); 1065 enum SL_RATEPROP_SILENTAUDIO = (cast(SLuint32) 0x00000100); 1066 enum SL_RATEPROP_STAGGEREDAUDIO = (cast(SLuint32) 0x00000200); 1067 enum SL_RATEPROP_NOPITCHCORAUDIO = (cast(SLuint32) 0x00000400); 1068 enum SL_RATEPROP_PITCHCORAUDIO = (cast(SLuint32) 0x00000800); 1069 1070 1071 extern const(SLInterfaceID) SL_IID_PLAYBACKRATE; 1072 1073 1074 alias SLPlaybackRateItf = const(SLPlaybackRateItf_*)*; 1075 1076 struct SLPlaybackRateItf_ { 1077 SLresult function ( 1078 SLPlaybackRateItf self, 1079 SLpermille rate 1080 ) SetRate; 1081 SLresult function ( 1082 SLPlaybackRateItf self, 1083 SLpermille *pRate 1084 ) GetRate; 1085 SLresult function ( 1086 SLPlaybackRateItf self, 1087 SLuint32 constraints 1088 ) SetPropertyConstraints; 1089 SLresult function ( 1090 SLPlaybackRateItf self, 1091 SLuint32 *pProperties 1092 ) GetProperties; 1093 SLresult function ( 1094 SLPlaybackRateItf self, 1095 SLpermille rate, 1096 SLuint32 *pCapabilities 1097 ) GetCapabilitiesOfRate; 1098 SLresult function ( 1099 SLPlaybackRateItf self, 1100 SLuint8 index, 1101 SLpermille *pMinRate, 1102 SLpermille *pMaxRate, 1103 SLpermille *pStepSize, 1104 SLuint32 *pCapabilities 1105 ) GetRateRange; 1106 } 1107 1108 /*---------------------------------------------------------------------------*/ 1109 /* Seek Interface */ 1110 /*---------------------------------------------------------------------------*/ 1111 1112 enum SL_SEEKMODE_FAST = (cast(SLuint32) 0x0001); 1113 enum SL_SEEKMODE_ACCURATE = (cast(SLuint32) 0x0002); 1114 1115 extern const(SLInterfaceID) SL_IID_SEEK; 1116 1117 1118 alias SLSeekItf = const(SLSeekItf_*)*; 1119 1120 struct SLSeekItf_ { 1121 SLresult function( 1122 SLSeekItf self, 1123 SLmillisecond pos, 1124 SLuint32 seekMode 1125 ) SetPosition; 1126 SLresult function( 1127 SLSeekItf self, 1128 SLboolean loopEnable, 1129 SLmillisecond startPos, 1130 SLmillisecond endPos 1131 ) SetLoop; 1132 SLresult function( 1133 SLSeekItf self, 1134 SLboolean *pLoopEnabled, 1135 SLmillisecond *pStartPos, 1136 SLmillisecond *pEndPos 1137 ) GetLoop; 1138 } 1139 1140 /*---------------------------------------------------------------------------*/ 1141 /* Standard Recording Interface */ 1142 /*---------------------------------------------------------------------------*/ 1143 1144 /** Recording states */ 1145 enum SL_RECORDSTATE_STOPPED = (cast(SLuint32) 0x00000001); 1146 enum SL_RECORDSTATE_PAUSED = (cast(SLuint32) 0x00000002); 1147 enum SL_RECORDSTATE_RECORDING = (cast(SLuint32) 0x00000003); 1148 1149 1150 /** Record event **/ 1151 enum SL_RECORDEVENT_HEADATLIMIT = (cast(SLuint32) 0x00000001); 1152 enum SL_RECORDEVENT_HEADATMARKER = (cast(SLuint32) 0x00000002); 1153 enum SL_RECORDEVENT_HEADATNEWPOS = (cast(SLuint32) 0x00000004); 1154 enum SL_RECORDEVENT_HEADMOVING = (cast(SLuint32) 0x00000008); 1155 enum SL_RECORDEVENT_HEADSTALLED = (cast(SLuint32) 0x00000010); 1156 /* Note: SL_RECORDEVENT_BUFFER_INSUFFICIENT is deprecated, use SL_RECORDEVENT_BUFFER_FULL instead. */ 1157 enum SL_RECORDEVENT_BUFFER_INSUFFICIENT = (cast(SLuint32) 0x00000020); 1158 enum SL_RECORDEVENT_BUFFER_FULL = (cast(SLuint32) 0x00000020); 1159 1160 1161 extern const(SLInterfaceID) SL_IID_RECORD; 1162 1163 1164 alias SLRecordItf = const(SLRecordItf_*)*; 1165 1166 alias slRecordCallback = void function ( 1167 SLRecordItf caller, 1168 void *pContext, 1169 SLuint32 event 1170 ); 1171 1172 /** Recording interface methods */ 1173 struct SLRecordItf_ { 1174 SLresult function ( 1175 SLRecordItf self, 1176 SLuint32 state 1177 ) SetRecordState; 1178 SLresult function ( 1179 SLRecordItf self, 1180 SLuint32 *pState 1181 ) GetRecordState; 1182 SLresult function ( 1183 SLRecordItf self, 1184 SLmillisecond msec 1185 ) SetDurationLimit; 1186 SLresult function ( 1187 SLRecordItf self, 1188 SLmillisecond *pMsec 1189 ) GetPosition; 1190 SLresult function ( 1191 SLRecordItf self, 1192 slRecordCallback callback, 1193 void *pContext 1194 ) RegisterCallback; 1195 SLresult function ( 1196 SLRecordItf self, 1197 SLuint32 eventFlags 1198 ) SetCallbackEventsMask; 1199 SLresult function ( 1200 SLRecordItf self, 1201 SLuint32 *pEventFlags 1202 ) GetCallbackEventsMask; 1203 SLresult function ( 1204 SLRecordItf self, 1205 SLmillisecond mSec 1206 ) SetMarkerPosition; 1207 SLresult function ( 1208 SLRecordItf self 1209 ) ClearMarkerPosition; 1210 SLresult function ( 1211 SLRecordItf self, 1212 SLmillisecond *pMsec 1213 ) GetMarkerPosition; 1214 SLresult function ( 1215 SLRecordItf self, 1216 SLmillisecond mSec 1217 ) SetPositionUpdatePeriod; 1218 SLresult function ( 1219 SLRecordItf self, 1220 SLmillisecond *pMsec 1221 ) GetPositionUpdatePeriod; 1222 }; 1223 1224 /*---------------------------------------------------------------------------*/ 1225 /* Equalizer interface */ 1226 /*---------------------------------------------------------------------------*/ 1227 1228 enum SL_EQUALIZER_UNDEFINED = (cast(SLuint16) 0xFFFF); 1229 1230 extern const(SLInterfaceID) SL_IID_EQUALIZER; 1231 1232 1233 alias SLEqualizerItf = const(SLEqualizerItf_*)*; 1234 1235 struct SLEqualizerItf_ { 1236 SLresult function ( 1237 SLEqualizerItf self, 1238 SLboolean enabled 1239 ) SetEnabled; 1240 SLresult function ( 1241 SLEqualizerItf self, 1242 SLboolean *pEnabled 1243 ) IsEnabled; 1244 SLresult function ( 1245 SLEqualizerItf self, 1246 SLuint16 *pAmount 1247 ) GetNumberOfBands; 1248 SLresult function ( 1249 SLEqualizerItf self, 1250 SLmillibel *pMin, 1251 SLmillibel *pMax 1252 ) GetBandLevelRange; 1253 SLresult function ( 1254 SLEqualizerItf self, 1255 SLuint16 band, 1256 SLmillibel level 1257 ) SetBandLevel; 1258 SLresult function ( 1259 SLEqualizerItf self, 1260 SLuint16 band, 1261 SLmillibel *pLevel 1262 ) GetBandLevel; 1263 SLresult function ( 1264 SLEqualizerItf self, 1265 SLuint16 band, 1266 SLmilliHertz *pCenter 1267 ) GetCenterFreq; 1268 SLresult function ( 1269 SLEqualizerItf self, 1270 SLuint16 band, 1271 SLmilliHertz *pMin, 1272 SLmilliHertz *pMax 1273 ) GetBandFreqRange; 1274 SLresult function ( 1275 SLEqualizerItf self, 1276 SLmilliHertz frequency, 1277 SLuint16 *pBand 1278 ) GetBand; 1279 SLresult function ( 1280 SLEqualizerItf self, 1281 SLuint16 *pPreset 1282 ) GetCurrentPreset; 1283 SLresult function ( 1284 SLEqualizerItf self, 1285 SLuint16 index 1286 ) UsePreset; 1287 SLresult function ( 1288 SLEqualizerItf self, 1289 SLuint16 *pNumPresets 1290 ) GetNumberOfPresets; 1291 SLresult function ( 1292 SLEqualizerItf self, 1293 SLuint16 index, 1294 const SLchar ** ppName 1295 ) GetPresetName; 1296 } 1297 1298 /*---------------------------------------------------------------------------*/ 1299 /* Volume Interface */ 1300 /* --------------------------------------------------------------------------*/ 1301 1302 extern const(SLInterfaceID) SL_IID_VOLUME; 1303 1304 1305 alias SLVolumeItf = const(SLVolumeItf_*)*; 1306 1307 struct SLVolumeItf_ { 1308 SLresult function ( 1309 SLVolumeItf self, 1310 SLmillibel level 1311 ) SetVolumeLevel; 1312 SLresult function ( 1313 SLVolumeItf self, 1314 SLmillibel *pLevel 1315 ) GetVolumeLevel; 1316 SLresult function ( 1317 SLVolumeItf self, 1318 SLmillibel *pMaxLevel 1319 ) GetMaxVolumeLevel; 1320 SLresult function ( 1321 SLVolumeItf self, 1322 SLboolean mute 1323 ) SetMute; 1324 SLresult function ( 1325 SLVolumeItf self, 1326 SLboolean *pMute 1327 ) GetMute; 1328 SLresult function ( 1329 SLVolumeItf self, 1330 SLboolean enable 1331 ) EnableStereoPosition; 1332 SLresult function ( 1333 SLVolumeItf self, 1334 SLboolean *pEnable 1335 ) IsEnabledStereoPosition; 1336 SLresult function ( 1337 SLVolumeItf self, 1338 SLpermille stereoPosition 1339 ) SetStereoPosition; 1340 SLresult function ( 1341 SLVolumeItf self, 1342 SLpermille *pStereoPosition 1343 ) GetStereoPosition; 1344 } 1345 1346 1347 /*---------------------------------------------------------------------------*/ 1348 /* Device Volume Interface */ 1349 /* --------------------------------------------------------------------------*/ 1350 1351 extern const(SLInterfaceID) SL_IID_DEVICEVOLUME; 1352 1353 1354 alias SLDeviceVolumeItf = const(SLDeviceVolumeItf_*)*; 1355 1356 struct SLDeviceVolumeItf_ { 1357 SLresult function ( 1358 SLDeviceVolumeItf self, 1359 SLuint32 deviceID, 1360 SLint32 *pMinValue, 1361 SLint32 *pMaxValue, 1362 SLboolean *pIsMillibelScale 1363 ) GetVolumeScale; 1364 SLresult function ( 1365 SLDeviceVolumeItf self, 1366 SLuint32 deviceID, 1367 SLint32 volume 1368 ) SetVolume; 1369 SLresult function ( 1370 SLDeviceVolumeItf self, 1371 SLuint32 deviceID, 1372 SLint32 *pVolume 1373 ) GetVolume; 1374 }; 1375 1376 1377 /*---------------------------------------------------------------------------*/ 1378 /* Buffer Queue Interface */ 1379 /*---------------------------------------------------------------------------*/ 1380 1381 extern const(SLInterfaceID) SL_IID_BUFFERQUEUE; 1382 1383 1384 alias SLBufferQueueItf = const(SLBufferQueueItf_*)*; 1385 1386 alias slBufferQueueCallback = void function ( 1387 SLBufferQueueItf caller, 1388 void *pContext 1389 ); 1390 1391 /** Buffer queue state **/ 1392 1393 struct SLBufferQueueState_ { 1394 SLuint32 count; 1395 SLuint32 playIndex; 1396 } 1397 alias SLBufferQueueState = SLBufferQueueState_; 1398 1399 1400 struct SLBufferQueueItf_ { 1401 SLresult function ( 1402 SLBufferQueueItf self, 1403 const void *pBuffer, 1404 SLuint32 size 1405 )Enqueue ; 1406 SLresult function ( 1407 SLBufferQueueItf self 1408 ) Clear; 1409 SLresult function ( 1410 SLBufferQueueItf self, 1411 SLBufferQueueState *pState 1412 ) GetState; 1413 SLresult function ( 1414 SLBufferQueueItf self, 1415 slBufferQueueCallback callback, 1416 void* pContext 1417 ) RegisterCallback; 1418 } 1419 1420 1421 /*---------------------------------------------------------------------------*/ 1422 /* PresetReverb */ 1423 /*---------------------------------------------------------------------------*/ 1424 1425 enum SL_REVERBPRESET_NONE = (cast(SLuint16) 0x0000); 1426 enum SL_REVERBPRESET_SMALLROOM = (cast(SLuint16) 0x0001); 1427 enum SL_REVERBPRESET_MEDIUMROOM = (cast(SLuint16) 0x0002); 1428 enum SL_REVERBPRESET_LARGEROOM = (cast(SLuint16) 0x0003); 1429 enum SL_REVERBPRESET_MEDIUMHALL = (cast(SLuint16) 0x0004); 1430 enum SL_REVERBPRESET_LARGEHALL = (cast(SLuint16) 0x0005); 1431 enum SL_REVERBPRESET_PLATE = (cast(SLuint16) 0x0006); 1432 1433 1434 extern const(SLInterfaceID) SL_IID_PRESETREVERB; 1435 1436 alias SLPresetReverbItf = const(SLPrefetchStatusItf_*)*; 1437 1438 struct SLPresetReverbItf_ { 1439 SLresult function ( 1440 SLPresetReverbItf self, 1441 SLuint16 preset 1442 ) SetPreset; 1443 SLresult function ( 1444 SLPresetReverbItf self, 1445 SLuint16 *pPreset 1446 ) GetPreset; 1447 } 1448 1449 1450 /*---------------------------------------------------------------------------*/ 1451 /* EnvironmentalReverb */ 1452 /*---------------------------------------------------------------------------*/ 1453 1454 enum SL_I3DL2_ENVIRONMENT_PRESET_DEFAULT = 1455 SLEnvironmentalReverbSettings(SL_MILLIBEL_MIN, 0, 1000, 500, SL_MILLIBEL_MIN, 20, SL_MILLIBEL_MIN, 40, 1000,1000 ); 1456 enum SL_I3DL2_ENVIRONMENT_PRESET_GENERIC = 1457 SLEnvironmentalReverbSettings(-1000, -100, 1490, 830, -2602, 7, 200, 11, 1000,1000 ); 1458 enum SL_I3DL2_ENVIRONMENT_PRESET_PADDEDCELL = 1459 SLEnvironmentalReverbSettings(-1000,-6000, 170, 100, -1204, 1, 207, 2, 1000,1000 ); 1460 enum SL_I3DL2_ENVIRONMENT_PRESET_ROOM = 1461 SLEnvironmentalReverbSettings(-1000, -454, 400, 830, -1646, 2, 53, 3, 1000,1000 ); 1462 enum SL_I3DL2_ENVIRONMENT_PRESET_BATHROOM = 1463 SLEnvironmentalReverbSettings(-1000,-1200, 1490, 540, -370, 7, 1030, 11, 1000, 600 ); 1464 enum SL_I3DL2_ENVIRONMENT_PRESET_LIVINGROOM = 1465 SLEnvironmentalReverbSettings(-1000,-6000, 500, 100, -1376, 3, -1104, 4, 1000,1000 ); 1466 enum SL_I3DL2_ENVIRONMENT_PRESET_STONEROOM = 1467 SLEnvironmentalReverbSettings(-1000, -300, 2310, 640, -711, 12, 83, 17, 1000,1000 ); 1468 enum SL_I3DL2_ENVIRONMENT_PRESET_AUDITORIUM = 1469 SLEnvironmentalReverbSettings(-1000, -476, 4320, 590, -789, 20, -289, 30, 1000,1000 ); 1470 enum SL_I3DL2_ENVIRONMENT_PRESET_CONCERTHALL = 1471 SLEnvironmentalReverbSettings(-1000, -500, 3920, 700, -1230, 20, -2, 29, 1000,1000 ); 1472 enum SL_I3DL2_ENVIRONMENT_PRESET_CAVE = 1473 SLEnvironmentalReverbSettings(-1000, 0, 2910, 1300, -602, 15, -302, 22, 1000,1000 ); 1474 enum SL_I3DL2_ENVIRONMENT_PRESET_ARENA = 1475 SLEnvironmentalReverbSettings(-1000, -698, 7240, 330, -1166, 20, 16, 30, 1000,1000 ); 1476 enum SL_I3DL2_ENVIRONMENT_PRESET_HANGAR = 1477 SLEnvironmentalReverbSettings(-1000,-1000, 10050, 230, -602, 20, 198, 30, 1000,1000 ); 1478 enum SL_I3DL2_ENVIRONMENT_PRESET_CARPETEDHALLWAY = 1479 SLEnvironmentalReverbSettings(-1000,-4000, 300, 100, -1831, 2, -1630, 30, 1000,1000 ); 1480 enum SL_I3DL2_ENVIRONMENT_PRESET_HALLWAY = 1481 SLEnvironmentalReverbSettings(-1000, -300, 1490, 590, -1219, 7, 441, 11, 1000,1000 ); 1482 enum SL_I3DL2_ENVIRONMENT_PRESET_STONECORRIDOR = 1483 SLEnvironmentalReverbSettings(-1000, -237, 2700, 790, -1214, 13, 395, 20, 1000,1000 ); 1484 enum SL_I3DL2_ENVIRONMENT_PRESET_ALLEY = 1485 SLEnvironmentalReverbSettings(-1000, -270, 1490, 860, -1204, 7, -4, 11, 1000,1000 ); 1486 enum SL_I3DL2_ENVIRONMENT_PRESET_FOREST = 1487 SLEnvironmentalReverbSettings(-1000,-3300, 1490, 540, -2560, 162, -613, 88, 790,1000 ); 1488 enum SL_I3DL2_ENVIRONMENT_PRESET_CITY = 1489 SLEnvironmentalReverbSettings(-1000, -800, 1490, 670, -2273, 7, -2217, 11, 500,1000 ); 1490 enum SL_I3DL2_ENVIRONMENT_PRESET_MOUNTAINS = 1491 SLEnvironmentalReverbSettings(-1000,-2500, 1490, 210, -2780, 300, -2014, 100, 270,1000 ); 1492 enum SL_I3DL2_ENVIRONMENT_PRESET_QUARRY = 1493 SLEnvironmentalReverbSettings(-1000,-1000, 1490, 830, SL_MILLIBEL_MIN, 61, 500, 25, 1000,1000 ); 1494 enum SL_I3DL2_ENVIRONMENT_PRESET_PLAIN = 1495 SLEnvironmentalReverbSettings(-1000,-2000, 1490, 500, -2466, 179, -2514, 100, 210,1000 ); 1496 enum SL_I3DL2_ENVIRONMENT_PRESET_PARKINGLOT = 1497 SLEnvironmentalReverbSettings(-1000, 0, 1650, 1500, -1363, 8, -1153, 12, 1000,1000 ); 1498 enum SL_I3DL2_ENVIRONMENT_PRESET_SEWERPIPE = 1499 SLEnvironmentalReverbSettings(-1000,-1000, 2810, 140, 429, 14, 648, 21, 800, 600 ); 1500 enum SL_I3DL2_ENVIRONMENT_PRESET_UNDERWATER = 1501 SLEnvironmentalReverbSettings(-1000,-4000, 1490, 100, -449, 7, 1700, 11, 1000,1000 ); 1502 enum SL_I3DL2_ENVIRONMENT_PRESET_SMALLROOM = 1503 SLEnvironmentalReverbSettings(-1000,-600, 1100, 830, -400, 5, 500, 10, 1000, 1000 ); 1504 enum SL_I3DL2_ENVIRONMENT_PRESET_MEDIUMROOM = 1505 SLEnvironmentalReverbSettings(-1000,-600, 1300, 830, -1000, 20, -200, 20, 1000, 1000 ); 1506 enum SL_I3DL2_ENVIRONMENT_PRESET_LARGEROOM = 1507 SLEnvironmentalReverbSettings(-1000,-600, 1500, 830, -1600, 5, -1000, 40, 1000, 1000 ); 1508 enum SL_I3DL2_ENVIRONMENT_PRESET_MEDIUMHALL = 1509 SLEnvironmentalReverbSettings(-1000,-600, 1800, 700, -1300, 15, -800, 30, 1000, 1000 ); 1510 enum SL_I3DL2_ENVIRONMENT_PRESET_LARGEHALL = 1511 SLEnvironmentalReverbSettings(-1000,-600, 1800, 700, -2000, 30, -1400, 60, 1000, 1000 ); 1512 enum SL_I3DL2_ENVIRONMENT_PRESET_PLATE = 1513 SLEnvironmentalReverbSettings(-1000,-200, 1300, 900, 0, 2, 0, 10, 1000, 750 ); 1514 1515 1516 struct SLEnvironmentalReverbSettings_ { 1517 SLmillibel roomLevel; 1518 SLmillibel roomHFLevel; 1519 SLmillisecond decayTime; 1520 SLpermille decayHFRatio; 1521 SLmillibel reflectionsLevel; 1522 SLmillisecond reflectionsDelay; 1523 SLmillibel reverbLevel; 1524 SLmillisecond reverbDelay; 1525 SLpermille diffusion; 1526 SLpermille density; 1527 } 1528 alias SLEnvironmentalReverbSettings = SLEnvironmentalReverbSettings_; 1529 1530 1531 extern const(SLInterfaceID) SL_IID_ENVIRONMENTALREVERB; 1532 1533 1534 1535 alias SLEnvironmentalReverbItf = const(SLEnvironmentalReverbItf_*)*; 1536 1537 struct SLEnvironmentalReverbItf_ { 1538 SLresult function ( 1539 SLEnvironmentalReverbItf self, 1540 SLmillibel room 1541 ) SetRoomLevel; 1542 SLresult function ( 1543 SLEnvironmentalReverbItf self, 1544 SLmillibel *pRoom 1545 ) GetRoomLevel; 1546 SLresult function ( 1547 SLEnvironmentalReverbItf self, 1548 SLmillibel roomHF 1549 ) SetRoomHFLevel; 1550 SLresult function ( 1551 SLEnvironmentalReverbItf self, 1552 SLmillibel *pRoomHF 1553 ) GetRoomHFLevel; 1554 SLresult function ( 1555 SLEnvironmentalReverbItf self, 1556 SLmillisecond decayTime 1557 ) SetDecayTime; 1558 SLresult function ( 1559 SLEnvironmentalReverbItf self, 1560 SLmillisecond *pDecayTime 1561 ) GetDecayTime; 1562 SLresult function ( 1563 SLEnvironmentalReverbItf self, 1564 SLpermille decayHFRatio 1565 ) SetDecayHFRatio; 1566 SLresult function ( 1567 SLEnvironmentalReverbItf self, 1568 SLpermille *pDecayHFRatio 1569 ) GetDecayHFRatio; 1570 SLresult function ( 1571 SLEnvironmentalReverbItf self, 1572 SLmillibel reflectionsLevel 1573 ) SetReflectionsLevel; 1574 SLresult function ( 1575 SLEnvironmentalReverbItf self, 1576 SLmillibel *pReflectionsLevel 1577 ) GetReflectionsLevel; 1578 SLresult function ( 1579 SLEnvironmentalReverbItf self, 1580 SLmillisecond reflectionsDelay 1581 ) SetReflectionsDelay; 1582 SLresult function ( 1583 SLEnvironmentalReverbItf self, 1584 SLmillisecond *pReflectionsDelay 1585 ) GetReflectionsDelay; 1586 SLresult function ( 1587 SLEnvironmentalReverbItf self, 1588 SLmillibel reverbLevel 1589 ) SetReverbLevel; 1590 SLresult function ( 1591 SLEnvironmentalReverbItf self, 1592 SLmillibel *pReverbLevel 1593 ) GetReverbLevel; 1594 SLresult function ( 1595 SLEnvironmentalReverbItf self, 1596 SLmillisecond reverbDelay 1597 ) SetReverbDelay; 1598 SLresult function ( 1599 SLEnvironmentalReverbItf self, 1600 SLmillisecond *pReverbDelay 1601 ) GetReverbDelay; 1602 SLresult function ( 1603 SLEnvironmentalReverbItf self, 1604 SLpermille diffusion 1605 ) SetDiffusion; 1606 SLresult function ( 1607 SLEnvironmentalReverbItf self, 1608 SLpermille *pDiffusion 1609 ) GetDiffusion; 1610 SLresult function ( 1611 SLEnvironmentalReverbItf self, 1612 SLpermille density 1613 ) SetDensity; 1614 SLresult function ( 1615 SLEnvironmentalReverbItf self, 1616 SLpermille *pDensity 1617 ) GetDensity; 1618 SLresult function ( 1619 SLEnvironmentalReverbItf self, 1620 const SLEnvironmentalReverbSettings *pProperties 1621 ) SetEnvironmentalReverbProperties; 1622 SLresult function ( 1623 SLEnvironmentalReverbItf self, 1624 SLEnvironmentalReverbSettings *pProperties 1625 ) GetEnvironmentalReverbProperties; 1626 }; 1627 1628 /*---------------------------------------------------------------------------*/ 1629 /* Effects Send Interface */ 1630 /*---------------------------------------------------------------------------*/ 1631 1632 1633 extern const(SLInterfaceID) SL_IID_EFFECTSEND; 1634 1635 1636 alias SLEffectSendItf = const(SLEffectSendItf_*)*; 1637 1638 struct SLEffectSendItf_ { 1639 SLresult function( 1640 SLEffectSendItf self, 1641 const void *pAuxEffect, 1642 SLboolean enable, 1643 SLmillibel initialLevel 1644 ) EnableEffectSend; 1645 SLresult function ( 1646 SLEffectSendItf self, 1647 const void * pAuxEffect, 1648 SLboolean *pEnable 1649 ) IsEnabled; 1650 SLresult function ( 1651 SLEffectSendItf self, 1652 SLmillibel directLevel 1653 ) SetDirectLevel; 1654 SLresult function ( 1655 SLEffectSendItf self, 1656 SLmillibel *pDirectLevel 1657 ) GetDirectLevel; 1658 SLresult function ( 1659 SLEffectSendItf self, 1660 const void *pAuxEffect, 1661 SLmillibel sendLevel 1662 ) SetSendLevel; 1663 SLresult function ( 1664 SLEffectSendItf self, 1665 const void *pAuxEffect, 1666 SLmillibel *pSendLevel 1667 ) GetSendLevel; 1668 }; 1669 1670 1671 /*---------------------------------------------------------------------------*/ 1672 /* 3D Grouping Interface */ 1673 /*---------------------------------------------------------------------------*/ 1674 1675 1676 extern const(SLInterfaceID) SL_IID_3DGROUPING; 1677 1678 1679 alias SL3DGroupingItf = const(SL3DGroupingItf_*)*; 1680 1681 struct SL3DGroupingItf_ { 1682 SLresult function ( 1683 SL3DGroupingItf self, 1684 SLObjectItf group 1685 ) Set3DGroup; 1686 SLresult function ( 1687 SL3DGroupingItf self, 1688 SLObjectItf *pGroup 1689 ) Get3DGroup; 1690 }; 1691 1692 1693 /*---------------------------------------------------------------------------*/ 1694 /* 3D Commit Interface */ 1695 /*---------------------------------------------------------------------------*/ 1696 1697 1698 extern const(SLInterfaceID) SL_IID_3DCOMMIT; 1699 1700 1701 alias SL3DCommitItf = const(SL3DCommitItf_*)*; 1702 1703 struct SL3DCommitItf_ { 1704 SLresult function ( 1705 SL3DCommitItf self 1706 ) Commit; 1707 SLresult function ( 1708 SL3DCommitItf self, 1709 SLboolean deferred 1710 ) SetDeferred; 1711 }; 1712 1713 1714 /*---------------------------------------------------------------------------*/ 1715 /* 3D Location Interface */ 1716 /*---------------------------------------------------------------------------*/ 1717 1718 struct SLVec3D_ { 1719 SLint32 x; 1720 SLint32 y; 1721 SLint32 z; 1722 } 1723 alias SLVec3D = SLVec3D_; 1724 1725 extern const(SLInterfaceID) SL_IID_3DLOCATION; 1726 1727 1728 alias SL3DLocationItf = const(SL3DLocationItf_*)*; 1729 1730 struct SL3DLocationItf_ { 1731 SLresult function ( 1732 SL3DLocationItf self, 1733 const SLVec3D *pLocation 1734 ) SetLocationCartesian; 1735 SLresult function ( 1736 SL3DLocationItf self, 1737 SLmillidegree azimuth, 1738 SLmillidegree elevation, 1739 SLmillimeter distance 1740 ) SetLocationSpherical; 1741 SLresult function ( 1742 SL3DLocationItf self, 1743 const SLVec3D *pMovement 1744 ) Move; 1745 SLresult function ( 1746 SL3DLocationItf self, 1747 SLVec3D *pLocation 1748 ) GetLocationCartesian; 1749 SLresult function ( 1750 SL3DLocationItf self, 1751 const SLVec3D *pFront, 1752 const SLVec3D *pAbove 1753 ) SetOrientationVectors; 1754 SLresult function ( 1755 SL3DLocationItf self, 1756 SLmillidegree heading, 1757 SLmillidegree pitch, 1758 SLmillidegree roll 1759 ) SetOrientationAngles; 1760 SLresult function ( 1761 SL3DLocationItf self, 1762 SLmillidegree theta, 1763 const SLVec3D *pAxis 1764 ) Rotate; 1765 SLresult function ( 1766 SL3DLocationItf self, 1767 SLVec3D *pFront, 1768 SLVec3D *pUp 1769 ) GetOrientationVectors; 1770 }; 1771 1772 1773 /*---------------------------------------------------------------------------*/ 1774 /* 3D Doppler Interface */ 1775 /*---------------------------------------------------------------------------*/ 1776 1777 1778 extern const(SLInterfaceID) SL_IID_3DDOPPLER; 1779 1780 1781 alias SL3DDopplerItf = const(SL3DDopplerItf_*)*; 1782 1783 struct SL3DDopplerItf_ { 1784 SLresult function ( 1785 SL3DDopplerItf self, 1786 const SLVec3D *pVelocity 1787 ) SetVelocityCartesian; 1788 SLresult function ( 1789 SL3DDopplerItf self, 1790 SLmillidegree azimuth, 1791 SLmillidegree elevation, 1792 SLmillimeter speed 1793 ) SetVelocitySpherical; 1794 SLresult function ( 1795 SL3DDopplerItf self, 1796 SLVec3D *pVelocity 1797 ) GetVelocityCartesian; 1798 SLresult function ( 1799 SL3DDopplerItf self, 1800 SLpermille dopplerFactor 1801 ) SetDopplerFactor; 1802 SLresult function ( 1803 SL3DDopplerItf self, 1804 SLpermille *pDopplerFactor 1805 ) GetDopplerFactor; 1806 }; 1807 1808 /*---------------------------------------------------------------------------*/ 1809 /* 3D Source Interface and associated defines */ 1810 /* --------------------------------------------------------------------------*/ 1811 1812 enum SL_ROLLOFFMODEL_EXPONENTIAL = (cast(SLuint32) 0x00000000); 1813 enum SL_ROLLOFFMODEL_LINEAR = (cast(SLuint32) 0x00000001); 1814 1815 1816 extern const(SLInterfaceID) SL_IID_3DSOURCE; 1817 1818 1819 alias SL3DSourceItf = const(SL3DSourceItf_*)*; 1820 1821 struct SL3DSourceItf_ { 1822 SLresult function ( 1823 SL3DSourceItf self, 1824 SLboolean headRelative 1825 ) SetHeadRelative; 1826 SLresult function ( 1827 SL3DSourceItf self, 1828 SLboolean *pHeadRelative 1829 ) GetHeadRelative; 1830 SLresult function ( 1831 SL3DSourceItf self, 1832 SLmillimeter minDistance, 1833 SLmillimeter maxDistance 1834 ) SetRolloffDistances; 1835 SLresult function ( 1836 SL3DSourceItf self, 1837 SLmillimeter *pMinDistance, 1838 SLmillimeter *pMaxDistance 1839 ) GetRolloffDistances; 1840 SLresult function ( 1841 SL3DSourceItf self, 1842 SLboolean mute 1843 ) SetRolloffMaxDistanceMute; 1844 SLresult function ( 1845 SL3DSourceItf self, 1846 SLboolean *pMute 1847 ) GetRolloffMaxDistanceMute; 1848 SLresult function ( 1849 SL3DSourceItf self, 1850 SLpermille rolloffFactor 1851 ) SetRolloffFactor; 1852 SLresult function ( 1853 SL3DSourceItf self, 1854 SLpermille *pRolloffFactor 1855 ) GetRolloffFactor; 1856 SLresult function ( 1857 SL3DSourceItf self, 1858 SLpermille roomRolloffFactor 1859 ) SetRoomRolloffFactor; 1860 SLresult function ( 1861 SL3DSourceItf self, 1862 SLpermille *pRoomRolloffFactor 1863 ) GetRoomRolloffFactor; 1864 SLresult function ( 1865 SL3DSourceItf self, 1866 SLuint8 model 1867 ) SetRolloffModel; 1868 SLresult function ( 1869 SL3DSourceItf self, 1870 SLuint8 *pModel 1871 ) GetRolloffModel; 1872 SLresult function ( 1873 SL3DSourceItf self, 1874 SLmillidegree innerAngle, 1875 SLmillidegree outerAngle, 1876 SLmillibel outerLevel 1877 ) SetCone; 1878 SLresult function ( 1879 SL3DSourceItf self, 1880 SLmillidegree *pInnerAngle, 1881 SLmillidegree *pOuterAngle, 1882 SLmillibel *pOuterLevel 1883 ) GetCone; 1884 }; 1885 1886 /*---------------------------------------------------------------------------*/ 1887 /* 3D Macroscopic Interface */ 1888 /* --------------------------------------------------------------------------*/ 1889 1890 extern const(SLInterfaceID) SL_IID_3DMACROSCOPIC; 1891 1892 1893 alias SL3DMacroscopicItf = const(SL3DMacroscopicItf_*)*; 1894 1895 struct SL3DMacroscopicItf_ { 1896 SLresult function ( 1897 SL3DMacroscopicItf self, 1898 SLmillimeter width, 1899 SLmillimeter height, 1900 SLmillimeter depth 1901 ) SetSize; 1902 SLresult function ( 1903 SL3DMacroscopicItf self, 1904 SLmillimeter *pWidth, 1905 SLmillimeter *pHeight, 1906 SLmillimeter *pDepth 1907 ) GetSize; 1908 SLresult function ( 1909 SL3DMacroscopicItf self, 1910 SLmillidegree heading, 1911 SLmillidegree pitch, 1912 SLmillidegree roll 1913 ) SetOrientationAngles; 1914 1915 SLresult function ( 1916 SL3DMacroscopicItf self, 1917 const SLVec3D *pFront, 1918 const SLVec3D *pAbove 1919 ) SetOrientationVectors; 1920 SLresult function ( 1921 SL3DMacroscopicItf self, 1922 SLmillidegree theta, 1923 const SLVec3D *pAxis 1924 ) Rotate; 1925 SLresult function ( 1926 SL3DMacroscopicItf self, 1927 SLVec3D *pFront, 1928 SLVec3D *pUp 1929 ) GetOrientationVectors; 1930 }; 1931 1932 /*---------------------------------------------------------------------------*/ 1933 /* Mute Solo Interface */ 1934 /* --------------------------------------------------------------------------*/ 1935 1936 1937 extern const(SLInterfaceID) SL_IID_MUTESOLO; 1938 1939 1940 alias SLMuteSoloItf = const(SLMuteSoloItf_*)*; 1941 1942 struct SLMuteSoloItf_ { 1943 SLresult function ( 1944 SLMuteSoloItf self, 1945 SLuint8 chan, 1946 SLboolean mute 1947 ) SetChannelMute; 1948 SLresult function ( 1949 SLMuteSoloItf self, 1950 SLuint8 chan, 1951 SLboolean *pMute 1952 ) GetChannelMute; 1953 SLresult function ( 1954 SLMuteSoloItf self, 1955 SLuint8 chan, 1956 SLboolean solo 1957 ) SetChannelSolo; 1958 SLresult function ( 1959 SLMuteSoloItf self, 1960 SLuint8 chan, 1961 SLboolean *pSolo 1962 ) GetChannelSolo; 1963 SLresult function ( 1964 SLMuteSoloItf self, 1965 SLuint8 *pNumChannels 1966 ) GetNumChannels; 1967 }; 1968 1969 1970 /*---------------------------------------------------------------------------*/ 1971 /* Dynamic Interface Management Interface and associated types and macros */ 1972 /* --------------------------------------------------------------------------*/ 1973 1974 enum SL_DYNAMIC_ITF_EVENT_RUNTIME_ERROR = (cast(SLuint32) 0x00000001); 1975 enum SL_DYNAMIC_ITF_EVENT_ASYNC_TERMINATION = (cast(SLuint32) 0x00000002); 1976 enum SL_DYNAMIC_ITF_EVENT_RESOURCES_LOST = (cast(SLuint32) 0x00000003); 1977 enum SL_DYNAMIC_ITF_EVENT_RESOURCES_LOST_PERMANENTLY = (cast(SLuint32) 0x00000004); 1978 enum SL_DYNAMIC_ITF_EVENT_RESOURCES_AVAILABLE = (cast(SLuint32) 0x00000005); 1979 1980 1981 1982 1983 extern const(SLInterfaceID) SL_IID_DYNAMICINTERFACEMANAGEMENT; 1984 1985 1986 alias SLDynamicInterfaceManagementItf = const(SLDynamicInterfaceManagementItf_*)*; 1987 1988 1989 alias slDynamicInterfaceManagementCallback = void function( 1990 SLDynamicInterfaceManagementItf caller, 1991 void * pContext, 1992 SLuint32 event, 1993 SLresult result, 1994 const SLInterfaceID iid 1995 ); 1996 1997 1998 struct SLDynamicInterfaceManagementItf_ { 1999 SLresult function ( 2000 SLDynamicInterfaceManagementItf self, 2001 const SLInterfaceID iid, 2002 SLboolean async 2003 ) AddInterface; 2004 SLresult function ( 2005 SLDynamicInterfaceManagementItf self, 2006 const SLInterfaceID iid 2007 ) RemoveInterface; 2008 SLresult function ( 2009 SLDynamicInterfaceManagementItf self, 2010 const SLInterfaceID iid, 2011 SLboolean async 2012 ) ResumeInterface; 2013 SLresult function ( 2014 SLDynamicInterfaceManagementItf self, 2015 slDynamicInterfaceManagementCallback callback, 2016 void * pContext 2017 ) RegisterCallback; 2018 }; 2019 2020 /*---------------------------------------------------------------------------*/ 2021 /* Midi Message Interface and associated types */ 2022 /* --------------------------------------------------------------------------*/ 2023 2024 enum SL_MIDIMESSAGETYPE_NOTE_ON_OFF = (cast(SLuint32) 0x00000001); 2025 enum SL_MIDIMESSAGETYPE_POLY_PRESSURE = (cast(SLuint32) 0x00000002); 2026 enum SL_MIDIMESSAGETYPE_CONTROL_CHANGE = (cast(SLuint32) 0x00000003); 2027 enum SL_MIDIMESSAGETYPE_PROGRAM_CHANGE = (cast(SLuint32) 0x00000004); 2028 enum SL_MIDIMESSAGETYPE_CHANNEL_PRESSURE = (cast(SLuint32) 0x00000005); 2029 enum SL_MIDIMESSAGETYPE_PITCH_BEND = (cast(SLuint32) 0x00000006); 2030 enum SL_MIDIMESSAGETYPE_SYSTEM_MESSAGE = (cast(SLuint32) 0x00000007); 2031 2032 2033 extern const(SLInterfaceID) SL_IID_MIDIMESSAGE; 2034 2035 2036 alias SLMIDIMessageItf = const(SLMIDIMessageItf_*)*; 2037 2038 2039 alias slMetaEventCallback = void function ( 2040 SLMIDIMessageItf caller, 2041 void *pContext, 2042 SLuint8 type, 2043 SLuint32 length, 2044 const SLuint8 *pData, 2045 SLuint32 tick, 2046 SLuint16 track 2047 ); 2048 2049 2050 alias slMIDIMessageCallback = void function ( 2051 SLMIDIMessageItf caller, 2052 void *pContext, 2053 SLuint8 statusByte, 2054 SLuint32 length, 2055 const SLuint8 *pData, 2056 SLuint32 tick, 2057 SLuint16 track 2058 ); 2059 2060 struct SLMIDIMessageItf_ { 2061 SLresult function ( 2062 SLMIDIMessageItf self, 2063 const SLuint8 *data, 2064 SLuint32 length 2065 ) SendMessage; 2066 SLresult function ( 2067 SLMIDIMessageItf self, 2068 slMetaEventCallback callback, 2069 void *pContext 2070 ) RegisterMetaEventCallback; 2071 SLresult function ( 2072 SLMIDIMessageItf self, 2073 slMIDIMessageCallback callback, 2074 void *pContext 2075 ) RegisterMIDIMessageCallback; 2076 2077 SLresult function ( 2078 SLMIDIMessageItf self, 2079 SLuint32 messageType 2080 ) AddMIDIMessageCallbackFilter; 2081 SLresult function ( 2082 SLMIDIMessageItf self 2083 ) ClearMIDIMessageCallbackFilter; 2084 }; 2085 2086 2087 /*---------------------------------------------------------------------------*/ 2088 /* Midi Mute Solo interface */ 2089 /* --------------------------------------------------------------------------*/ 2090 2091 2092 extern const(SLInterfaceID) SL_IID_MIDIMUTESOLO; 2093 2094 2095 alias SLMIDIMuteSoloItf = const(SLMIDIMuteSoloItf_*)*; 2096 2097 struct SLMIDIMuteSoloItf_ { 2098 SLresult function ( 2099 SLMIDIMuteSoloItf self, 2100 SLuint8 channel, 2101 SLboolean mute 2102 ) SetChannelMute; 2103 SLresult function ( 2104 SLMIDIMuteSoloItf self, 2105 SLuint8 channel, 2106 SLboolean *pMute 2107 ) GetChannelMute; 2108 SLresult function ( 2109 SLMIDIMuteSoloItf self, 2110 SLuint8 channel, 2111 SLboolean solo 2112 ) SetChannelSolo; 2113 SLresult function ( 2114 SLMIDIMuteSoloItf self, 2115 SLuint8 channel, 2116 SLboolean *pSolo 2117 ) GetChannelSolo; 2118 2119 SLresult function ( 2120 SLMIDIMuteSoloItf self, 2121 SLuint16 *pCount 2122 ) GetTrackCount; 2123 SLresult function ( 2124 SLMIDIMuteSoloItf self, 2125 SLuint16 track, 2126 SLboolean mute 2127 ) SetTrackMute; 2128 SLresult function ( 2129 SLMIDIMuteSoloItf self, 2130 SLuint16 track, 2131 SLboolean *pMute 2132 ) GetTrackMute; 2133 SLresult function ( 2134 SLMIDIMuteSoloItf self, 2135 SLuint16 track, 2136 SLboolean solo 2137 ) SetTrackSolo; 2138 SLresult function ( 2139 SLMIDIMuteSoloItf self, 2140 SLuint16 track, 2141 SLboolean *pSolo 2142 ) GetTrackSolo; 2143 }; 2144 2145 2146 /*---------------------------------------------------------------------------*/ 2147 /* Midi Tempo interface */ 2148 /* --------------------------------------------------------------------------*/ 2149 2150 2151 extern const(SLInterfaceID) SL_IID_MIDITEMPO; 2152 2153 2154 alias SLMIDITempoItf = const(SLMIDITempoItf_*)*; 2155 2156 struct SLMIDITempoItf_ { 2157 SLresult function ( 2158 SLMIDITempoItf self, 2159 SLuint32 tpqn 2160 ) SetTicksPerQuarterNote; 2161 SLresult function ( 2162 SLMIDITempoItf self, 2163 SLuint32 *pTpqn 2164 ) GetTicksPerQuarterNote; 2165 SLresult function ( 2166 SLMIDITempoItf self, 2167 SLmicrosecond uspqn 2168 ) SetMicrosecondsPerQuarterNote; 2169 SLresult function ( 2170 SLMIDITempoItf self, 2171 SLmicrosecond *uspqn 2172 ) GetMicrosecondsPerQuarterNote; 2173 }; 2174 2175 2176 /*---------------------------------------------------------------------------*/ 2177 /* Midi Time interface */ 2178 /* --------------------------------------------------------------------------*/ 2179 2180 2181 extern const(SLInterfaceID) SL_IID_MIDITIME; 2182 2183 2184 alias SLMIDITimeItf = const(SLMIDITimeItf_*)*; 2185 2186 struct SLMIDITimeItf_ { 2187 SLresult function ( 2188 SLMIDITimeItf self, 2189 SLuint32 *pDuration 2190 ) GetDuration; 2191 SLresult function ( 2192 SLMIDITimeItf self, 2193 SLuint32 position 2194 ) SetPosition; 2195 SLresult function ( 2196 SLMIDITimeItf self, 2197 SLuint32 *pPosition 2198 ) GetPosition; 2199 SLresult function ( 2200 SLMIDITimeItf self, 2201 SLuint32 startTick, 2202 SLuint32 numTicks 2203 ) SetLoopPoints; 2204 SLresult function ( 2205 SLMIDITimeItf self, 2206 SLuint32 *pStartTick, 2207 SLuint32 *pNumTicks 2208 ) GetLoopPoints; 2209 }; 2210 2211 2212 /*---------------------------------------------------------------------------*/ 2213 /* Audio Decoder Capabilities Interface */ 2214 /* --------------------------------------------------------------------------*/ 2215 2216 /*Audio Codec related defines*/ 2217 2218 enum SL_RATECONTROLMODE_CONSTANTBITRATE = (cast(SLuint32) 0x00000001); 2219 enum SL_RATECONTROLMODE_VARIABLEBITRATE = (cast(SLuint32) 0x00000002); 2220 2221 enum SL_AUDIOCODEC_PCM = (cast(SLuint32) 0x00000001); 2222 enum SL_AUDIOCODEC_MP3 = (cast(SLuint32) 0x00000002); 2223 enum SL_AUDIOCODEC_AMR = (cast(SLuint32) 0x00000003); 2224 enum SL_AUDIOCODEC_AMRWB = (cast(SLuint32) 0x00000004); 2225 enum SL_AUDIOCODEC_AMRWBPLUS = (cast(SLuint32) 0x00000005); 2226 enum SL_AUDIOCODEC_AAC = (cast(SLuint32) 0x00000006); 2227 enum SL_AUDIOCODEC_WMA = (cast(SLuint32) 0x00000007); 2228 enum SL_AUDIOCODEC_REAL = (cast(SLuint32) 0x00000008); 2229 2230 enum SL_AUDIOPROFILE_PCM = (cast(SLuint32) 0x00000001); 2231 2232 enum SL_AUDIOPROFILE_MPEG1_L3 = (cast(SLuint32) 0x00000001); 2233 enum SL_AUDIOPROFILE_MPEG2_L3 = (cast(SLuint32) 0x00000002); 2234 enum SL_AUDIOPROFILE_MPEG25_L3 = (cast(SLuint32) 0x00000003); 2235 2236 enum SL_AUDIOCHANMODE_MP3_MONO = (cast(SLuint32) 0x00000001); 2237 enum SL_AUDIOCHANMODE_MP3_STEREO = (cast(SLuint32) 0x00000002); 2238 enum SL_AUDIOCHANMODE_MP3_JOINTSTEREO = (cast(SLuint32) 0x00000003); 2239 enum SL_AUDIOCHANMODE_MP3_DUAL = (cast(SLuint32) 0x00000004); 2240 2241 enum SL_AUDIOPROFILE_AMR = (cast(SLuint32) 0x00000001); 2242 2243 enum SL_AUDIOSTREAMFORMAT_CONFORMANCE = (cast(SLuint32) 0x00000001); 2244 enum SL_AUDIOSTREAMFORMAT_IF1 = (cast(SLuint32) 0x00000002); 2245 enum SL_AUDIOSTREAMFORMAT_IF2 = (cast(SLuint32) 0x00000003); 2246 enum SL_AUDIOSTREAMFORMAT_FSF = (cast(SLuint32) 0x00000004); 2247 enum SL_AUDIOSTREAMFORMAT_RTPPAYLOAD = (cast(SLuint32) 0x00000005); 2248 enum SL_AUDIOSTREAMFORMAT_ITU = (cast(SLuint32) 0x00000006); 2249 2250 enum SL_AUDIOPROFILE_AMRWB = (cast(SLuint32) 0x00000001); 2251 2252 enum SL_AUDIOPROFILE_AMRWBPLUS = (cast(SLuint32) 0x00000001); 2253 2254 enum SL_AUDIOPROFILE_AAC_AAC = (cast(SLuint32) 0x00000001); 2255 2256 enum SL_AUDIOMODE_AAC_MAIN = (cast(SLuint32) 0x00000001); 2257 enum SL_AUDIOMODE_AAC_LC = (cast(SLuint32) 0x00000002); 2258 enum SL_AUDIOMODE_AAC_SSR = (cast(SLuint32) 0x00000003); 2259 enum SL_AUDIOMODE_AAC_LTP = (cast(SLuint32) 0x00000004); 2260 enum SL_AUDIOMODE_AAC_HE = (cast(SLuint32) 0x00000005); 2261 enum SL_AUDIOMODE_AAC_SCALABLE = (cast(SLuint32) 0x00000006); 2262 enum SL_AUDIOMODE_AAC_ERLC = (cast(SLuint32) 0x00000007); 2263 enum SL_AUDIOMODE_AAC_LD = (cast(SLuint32) 0x00000008); 2264 enum SL_AUDIOMODE_AAC_HE_PS = (cast(SLuint32) 0x00000009); 2265 enum SL_AUDIOMODE_AAC_HE_MPS = (cast(SLuint32) 0x0000000A); 2266 2267 enum SL_AUDIOSTREAMFORMAT_MP2ADTS = (cast(SLuint32) 0x00000001); 2268 enum SL_AUDIOSTREAMFORMAT_MP4ADTS = (cast(SLuint32) 0x00000002); 2269 enum SL_AUDIOSTREAMFORMAT_MP4LOAS = (cast(SLuint32) 0x00000003); 2270 enum SL_AUDIOSTREAMFORMAT_MP4LATM = (cast(SLuint32) 0x00000004); 2271 enum SL_AUDIOSTREAMFORMAT_ADIF = (cast(SLuint32) 0x00000005); 2272 enum SL_AUDIOSTREAMFORMAT_MP4FF = (cast(SLuint32) 0x00000006); 2273 enum SL_AUDIOSTREAMFORMAT_RAW = (cast(SLuint32) 0x00000007); 2274 2275 enum SL_AUDIOPROFILE_WMA7 = (cast(SLuint32) 0x00000001); 2276 enum SL_AUDIOPROFILE_WMA8 = (cast(SLuint32) 0x00000002); 2277 enum SL_AUDIOPROFILE_WMA9 = (cast(SLuint32) 0x00000003); 2278 enum SL_AUDIOPROFILE_WMA10 = (cast(SLuint32) 0x00000004); 2279 2280 enum SL_AUDIOMODE_WMA_LEVEL1 = (cast(SLuint32) 0x00000001); 2281 enum SL_AUDIOMODE_WMA_LEVEL2 = (cast(SLuint32) 0x00000002); 2282 enum SL_AUDIOMODE_WMA_LEVEL3 = (cast(SLuint32) 0x00000003); 2283 enum SL_AUDIOMODE_WMA_LEVEL4 = (cast(SLuint32) 0x00000004); 2284 enum SL_AUDIOMODE_WMAPRO_LEVELM0 = (cast(SLuint32) 0x00000005); 2285 enum SL_AUDIOMODE_WMAPRO_LEVELM1 = (cast(SLuint32) 0x00000006); 2286 enum SL_AUDIOMODE_WMAPRO_LEVELM2 = (cast(SLuint32) 0x00000007); 2287 enum SL_AUDIOMODE_WMAPRO_LEVELM3 = (cast(SLuint32) 0x00000008); 2288 2289 enum SL_AUDIOPROFILE_REALAUDIO = (cast(SLuint32) 0x00000001); 2290 2291 enum SL_AUDIOMODE_REALAUDIO_G2 = (cast(SLuint32) 0x00000001); 2292 enum SL_AUDIOMODE_REALAUDIO_8 = (cast(SLuint32) 0x00000002); 2293 enum SL_AUDIOMODE_REALAUDIO_10 = (cast(SLuint32) 0x00000003); 2294 enum SL_AUDIOMODE_REALAUDIO_SURROUND = (cast(SLuint32) 0x00000004); 2295 2296 struct SLAudioCodecDescriptor_ { 2297 SLuint32 maxChannels; 2298 SLuint32 minBitsPerSample; 2299 SLuint32 maxBitsPerSample; 2300 SLmilliHertz minSampleRate; 2301 SLmilliHertz maxSampleRate; 2302 SLboolean isFreqRangeContinuous; 2303 SLmilliHertz *pSampleRatesSupported; 2304 SLuint32 numSampleRatesSupported; 2305 SLuint32 minBitRate; 2306 SLuint32 maxBitRate; 2307 SLboolean isBitrateRangeContinuous; 2308 SLuint32 *pBitratesSupported; 2309 SLuint32 numBitratesSupported; 2310 SLuint32 profileSetting; 2311 SLuint32 modeSetting; 2312 } 2313 alias SLAudioCodecDescriptor = SLAudioCodecDescriptor_; 2314 2315 /*Structure used to retrieve the profile and level settings supported by an audio encoder */ 2316 2317 struct SLAudioCodecProfileMode_ { 2318 SLuint32 profileSetting; 2319 SLuint32 modeSetting; 2320 } 2321 alias SLAudioCodecProfileMode = SLAudioCodecProfileMode_; 2322 2323 extern const(SLInterfaceID) SL_IID_AUDIODECODERCAPABILITIES; 2324 2325 2326 alias SLAudioDecoderCapabilitiesItf = const(SLAudioDecoderCapabilitiesItf_*)*; 2327 2328 struct SLAudioDecoderCapabilitiesItf_ { 2329 SLresult function ( 2330 SLAudioDecoderCapabilitiesItf self, 2331 SLuint32 * pNumDecoders , 2332 SLuint32 *pDecoderIds 2333 ) GetAudioDecoders; 2334 SLresult function ( 2335 SLAudioDecoderCapabilitiesItf self, 2336 SLuint32 decoderId, 2337 SLuint32 *pIndex, 2338 SLAudioCodecDescriptor *pDescriptor 2339 ) GetAudioDecoderCapabilities; 2340 }; 2341 2342 2343 2344 2345 /*---------------------------------------------------------------------------*/ 2346 /* Audio Encoder Capabilities Interface */ 2347 /* --------------------------------------------------------------------------*/ 2348 2349 /* Structure used when setting audio encoding parameters */ 2350 2351 struct SLAudioEncoderSettings_ { 2352 SLuint32 encoderId; 2353 SLuint32 channelsIn; 2354 SLuint32 channelsOut; 2355 SLmilliHertz sampleRate; 2356 SLuint32 bitRate; 2357 SLuint32 bitsPerSample; 2358 SLuint32 rateControl; 2359 SLuint32 profileSetting; 2360 SLuint32 levelSetting; 2361 SLuint32 channelMode; 2362 SLuint32 streamFormat; 2363 SLuint32 encodeOptions; 2364 SLuint32 blockAlignment; 2365 } 2366 alias SLAudioEncoderSettings = SLAudioEncoderSettings_; 2367 2368 extern const(SLInterfaceID) SL_IID_AUDIOENCODERCAPABILITIES; 2369 2370 2371 alias SLAudioEncoderCapabilitiesItf = const(SLAudioEncoderCapabilitiesItf_*)*; 2372 2373 struct SLAudioEncoderCapabilitiesItf_ { 2374 SLresult function ( 2375 SLAudioEncoderCapabilitiesItf self, 2376 SLuint32 *pNumEncoders , 2377 SLuint32 *pEncoderIds 2378 ) GetAudioEncoders ; 2379 SLresult function ( 2380 SLAudioEncoderCapabilitiesItf self, 2381 SLuint32 encoderId, 2382 SLuint32 *pIndex, 2383 SLAudioCodecDescriptor * pDescriptor 2384 ) GetAudioEncoderCapabilities; 2385 }; 2386 2387 2388 /*---------------------------------------------------------------------------*/ 2389 /* Audio Encoder Interface */ 2390 /* --------------------------------------------------------------------------*/ 2391 2392 2393 extern const(SLInterfaceID) SL_IID_AUDIOENCODER; 2394 2395 2396 alias SLAudioEncoderItf = const(SLAudioEncoderItf_*)*; 2397 2398 struct SLAudioEncoderItf_ { 2399 SLresult function ( 2400 SLAudioEncoderItf self, 2401 SLAudioEncoderSettings *pSettings 2402 ) SetEncoderSettings; 2403 SLresult function ( 2404 SLAudioEncoderItf self, 2405 SLAudioEncoderSettings *pSettings 2406 ) GetEncoderSettings; 2407 }; 2408 2409 2410 /*---------------------------------------------------------------------------*/ 2411 /* Bass Boost Interface */ 2412 /* --------------------------------------------------------------------------*/ 2413 2414 2415 extern const(SLInterfaceID) SL_IID_BASSBOOST; 2416 2417 2418 alias SLBassBoostItf = const(SLBassBoostItf_*)*; 2419 2420 struct SLBassBoostItf_ { 2421 SLresult function ( 2422 SLBassBoostItf self, 2423 SLboolean enabled 2424 ) SetEnabled; 2425 SLresult function ( 2426 SLBassBoostItf self, 2427 SLboolean *pEnabled 2428 ) IsEnabled; 2429 SLresult function ( 2430 SLBassBoostItf self, 2431 SLpermille strength 2432 ) SetStrength; 2433 SLresult function ( 2434 SLBassBoostItf self, 2435 SLpermille *pStrength 2436 ) GetRoundedStrength; 2437 SLresult function ( 2438 SLBassBoostItf self, 2439 SLboolean *pSupported 2440 ) IsStrengthSupported; 2441 } 2442 2443 /*---------------------------------------------------------------------------*/ 2444 /* Pitch Interface */ 2445 /* --------------------------------------------------------------------------*/ 2446 2447 2448 extern const(SLInterfaceID) SL_IID_PITCH; 2449 2450 2451 alias SLPitchItf = const(SLPitchItf_*)*; 2452 2453 struct SLPitchItf_ { 2454 SLresult function ( 2455 SLPitchItf self, 2456 SLpermille pitch 2457 ) SetPitch; 2458 SLresult function ( 2459 SLPitchItf self, 2460 SLpermille *pPitch 2461 ) GetPitch; 2462 SLresult function ( 2463 SLPitchItf self, 2464 SLpermille *pMinPitch, 2465 SLpermille *pMaxPitch 2466 ) GetPitchCapabilities; 2467 }; 2468 2469 2470 /*---------------------------------------------------------------------------*/ 2471 /* Rate Pitch Interface */ 2472 /* RatePitchItf is an interface for controlling the rate a sound is played */ 2473 /* back. A change in rate will cause a change in pitch. */ 2474 /* --------------------------------------------------------------------------*/ 2475 2476 2477 extern const(SLInterfaceID) SL_IID_RATEPITCH; 2478 2479 2480 alias SLRatePitchItf = const(SLRatePitchItf_*)*; 2481 2482 struct SLRatePitchItf_ { 2483 SLresult function ( 2484 SLRatePitchItf self, 2485 SLpermille rate 2486 ) SetRate; 2487 SLresult function ( 2488 SLRatePitchItf self, 2489 SLpermille *pRate 2490 ) GetRate; 2491 SLresult function ( 2492 SLRatePitchItf self, 2493 SLpermille *pMinRate, 2494 SLpermille *pMaxRate 2495 ) GetRatePitchCapabilities; 2496 }; 2497 2498 2499 /*---------------------------------------------------------------------------*/ 2500 /* Virtualizer Interface */ 2501 /* --------------------------------------------------------------------------*/ 2502 2503 2504 extern const(SLInterfaceID) SL_IID_VIRTUALIZER; 2505 2506 2507 alias SLVirtualizerItf = const(SLVirtualizerItf_*)*; 2508 2509 struct SLVirtualizerItf_ { 2510 SLresult function ( 2511 SLVirtualizerItf self, 2512 SLboolean enabled 2513 ) SetEnabled; 2514 SLresult function ( 2515 SLVirtualizerItf self, 2516 SLboolean *pEnabled 2517 ) IsEnabled; 2518 SLresult function ( 2519 SLVirtualizerItf self, 2520 SLpermille strength 2521 ) SetStrength; 2522 SLresult function ( 2523 SLVirtualizerItf self, 2524 SLpermille *pStrength 2525 ) GetRoundedStrength; 2526 SLresult function ( 2527 SLVirtualizerItf self, 2528 SLboolean *pSupported 2529 ) IsStrengthSupported; 2530 }; 2531 2532 /*---------------------------------------------------------------------------*/ 2533 /* Visualization Interface */ 2534 /* --------------------------------------------------------------------------*/ 2535 2536 2537 extern const(SLInterfaceID) SL_IID_VISUALIZATION; 2538 2539 2540 alias SLVisualizationItf = const(SLVisualizationItf_*)*; 2541 2542 2543 alias slVisualizationCallback = void function( 2544 void *pContext, 2545 const SLuint8* waveform, 2546 const SLuint8* fft, 2547 SLmilliHertz samplerate 2548 ); 2549 2550 struct SLVisualizationItf_{ 2551 SLresult function ( 2552 SLVisualizationItf self, 2553 slVisualizationCallback callback, 2554 void *pContext, 2555 SLmilliHertz rate 2556 ) RegisterVisualizationCallback; 2557 SLresult function ( 2558 SLVisualizationItf self, 2559 SLmilliHertz* pRate 2560 ) GetMaxRate; 2561 }; 2562 2563 2564 /*---------------------------------------------------------------------------*/ 2565 /* Engine Interface */ 2566 /* --------------------------------------------------------------------------*/ 2567 2568 2569 extern const(SLInterfaceID) SL_IID_ENGINE; 2570 2571 2572 alias SLEngineItf = const(SLEngineItf_*)*; 2573 2574 2575 struct SLEngineItf_ { 2576 2577 SLresult function ( 2578 SLEngineItf self, 2579 SLObjectItf * pDevice, 2580 SLuint32 deviceID, 2581 SLuint32 numInterfaces, 2582 const SLInterfaceID * pInterfaceIds, 2583 const SLboolean * pInterfaceRequired 2584 ) CreateLEDDevice; 2585 2586 SLresult function ( 2587 SLEngineItf self, 2588 SLObjectItf * pDevice, 2589 SLuint32 deviceID, 2590 SLuint32 numInterfaces, 2591 const SLInterfaceID * pInterfaceIds, 2592 const SLboolean * pInterfaceRequired 2593 ) CreateVibraDevice; 2594 SLresult function ( 2595 SLEngineItf self, 2596 SLObjectItf * pPlayer, 2597 SLDataSource *pAudioSrc, 2598 SLDataSink *pAudioSnk, 2599 SLuint32 numInterfaces, 2600 const SLInterfaceID * pInterfaceIds, 2601 const SLboolean * pInterfaceRequired 2602 ) CreateAudioPlayer; 2603 SLresult function ( 2604 SLEngineItf self, 2605 SLObjectItf * pRecorder, 2606 SLDataSource *pAudioSrc, 2607 SLDataSink *pAudioSnk, 2608 SLuint32 numInterfaces, 2609 const SLInterfaceID * pInterfaceIds, 2610 const SLboolean * pInterfaceRequired 2611 ) CreateAudioRecorder; 2612 SLresult function ( 2613 SLEngineItf self, 2614 SLObjectItf * pPlayer, 2615 SLDataSource *pMIDISrc, 2616 SLDataSource *pBankSrc, 2617 SLDataSink *pAudioOutput, 2618 SLDataSink *pVibra, 2619 SLDataSink *pLEDArray, 2620 SLuint32 numInterfaces, 2621 const SLInterfaceID * pInterfaceIds, 2622 const SLboolean * pInterfaceRequired 2623 ) CreateMidiPlayer; 2624 SLresult function ( 2625 SLEngineItf self, 2626 SLObjectItf * pListener, 2627 SLuint32 numInterfaces, 2628 const SLInterfaceID * pInterfaceIds, 2629 const SLboolean * pInterfaceRequired 2630 ) CreateListener; 2631 SLresult function ( 2632 SLEngineItf self, 2633 SLObjectItf * pGroup, 2634 SLuint32 numInterfaces, 2635 const SLInterfaceID * pInterfaceIds, 2636 const SLboolean * pInterfaceRequired 2637 ) Create3DGroup; 2638 SLresult function( 2639 SLEngineItf self, 2640 SLObjectItf * pMix, 2641 SLuint32 numInterfaces, 2642 const SLInterfaceID * pInterfaceIds, 2643 const SLboolean * pInterfaceRequired 2644 ) CreateOutputMix; 2645 2646 SLresult function ( 2647 SLEngineItf self, 2648 SLObjectItf * pMetadataExtractor, 2649 SLDataSource * pDataSource, 2650 SLuint32 numInterfaces, 2651 const SLInterfaceID * pInterfaceIds, 2652 const SLboolean * pInterfaceRequired 2653 ) CreateMetadataExtractor; 2654 SLresult function ( 2655 SLEngineItf self, 2656 SLObjectItf * pObject, 2657 void * pParameters, 2658 SLuint32 objectID, 2659 SLuint32 numInterfaces, 2660 const SLInterfaceID * pInterfaceIds, 2661 const SLboolean * pInterfaceRequired 2662 ) CreateExtensionObject; 2663 SLresult function ( 2664 SLEngineItf self, 2665 SLuint32 objectID, 2666 SLuint32 * pNumSupportedInterfaces 2667 ) QueryNumSupportedInterfaces; 2668 SLresult function ( 2669 SLEngineItf self, 2670 SLuint32 objectID, 2671 SLuint32 index, 2672 SLInterfaceID * pInterfaceId 2673 ) QuerySupportedInterfaces; 2674 SLresult function ( 2675 SLEngineItf self, 2676 SLuint32 * pNumExtensions 2677 ) QueryNumSupportedExtensions; 2678 SLresult function ( 2679 SLEngineItf self, 2680 SLuint32 index, 2681 SLchar * pExtensionName, 2682 SLint16 * pNameLength 2683 ) QuerySupportedExtension; 2684 SLresult function ( 2685 SLEngineItf self, 2686 const SLchar * pExtensionName, 2687 SLboolean * pSupported 2688 ) IsExtensionSupported; 2689 }; 2690 2691 2692 /*---------------------------------------------------------------------------*/ 2693 /* Engine Capabilities Interface */ 2694 /* --------------------------------------------------------------------------*/ 2695 2696 2697 extern const(SLInterfaceID) SL_IID_ENGINECAPABILITIES; 2698 2699 2700 alias SLEngineCapabilitiesItf = const(SLEngineCapabilitiesItf_*)*; 2701 2702 struct SLEngineCapabilitiesItf_ { 2703 2704 SLresult function ( 2705 SLEngineCapabilitiesItf self, 2706 SLuint16 *pProfilesSupported 2707 ) QuerySupportedProfiles; 2708 SLresult function ( 2709 SLEngineCapabilitiesItf self, 2710 SLuint16 voiceType, 2711 SLint16 *pNumMaxVoices, 2712 SLboolean *pIsAbsoluteMax, 2713 SLint16 *pNumFreeVoices 2714 ) QueryAvailableVoices; 2715 SLresult function ( 2716 SLEngineCapabilitiesItf self, 2717 SLint16 *pNumMIDIsynthesizers 2718 ) QueryNumberOfMIDISynthesizers; 2719 SLresult function ( 2720 SLEngineCapabilitiesItf self, 2721 SLint16 *pMajor, 2722 SLint16 *pMinor, 2723 SLint16 *pStep 2724 ) QueryAPIVersion; 2725 SLresult function ( 2726 SLEngineCapabilitiesItf self, 2727 SLuint32 *pIndex, 2728 SLuint32 *pLEDDeviceID, 2729 SLLEDDescriptor *pDescriptor 2730 ) QueryLEDCapabilities; 2731 SLresult function ( 2732 SLEngineCapabilitiesItf self, 2733 SLuint32 *pIndex, 2734 SLuint32 *pVibraDeviceID, 2735 SLVibraDescriptor *pDescriptor 2736 ) QueryVibraCapabilities; 2737 SLresult function ( 2738 SLEngineCapabilitiesItf self, 2739 SLboolean *pIsThreadSafe 2740 ) IsThreadSafe; 2741 }; 2742 2743 /*---------------------------------------------------------------------------*/ 2744 /* Thread Sync Interface */ 2745 /* --------------------------------------------------------------------------*/ 2746 2747 2748 extern const(SLInterfaceID) SL_IID_THREADSYNC; 2749 2750 2751 alias SLThreadSyncItf = const(SLThreadSyncItf_*)*; 2752 2753 2754 struct SLThreadSyncItf_ { 2755 SLresult function ( 2756 SLThreadSyncItf self 2757 ) EnterCriticalSection; 2758 SLresult function ( 2759 SLThreadSyncItf self 2760 ) ExitCriticalSection; 2761 }; 2762 2763 2764 /*****************************************************************************/ 2765 /* SL engine constructor */ 2766 /*****************************************************************************/ 2767 2768 enum SL_ENGINEOPTION_THREADSAFE = (cast(SLuint32) 0x00000001); 2769 enum SL_ENGINEOPTION_LOSSOFCONTROL = (cast(SLuint32) 0x00000002); 2770 2771 struct SLEngineOption_ { 2772 SLuint32 feature; 2773 SLuint32 data; 2774 } 2775 alias SLEngineOption = SLEngineOption_; 2776 2777 2778 2779 SLresult slCreateEngine( 2780 SLObjectItf *pEngine, 2781 SLuint32 numOptions, 2782 const SLEngineOption *pEngineOptions, 2783 SLuint32 numInterfaces, 2784 const SLInterfaceID *pInterfaceIds, 2785 const SLboolean * pInterfaceRequired 2786 );// SL_API_DEPRECATED(30); 2787 2788 SLresult slQueryNumSupportedEngineInterfaces( 2789 SLuint32 * pNumSupportedInterfaces 2790 ); //SL_API_DEPRECATED(30); 2791 2792 SLresult slQuerySupportedEngineInterfaces( 2793 SLuint32 index, 2794 SLInterfaceID * pInterfaceId 2795 );// SL_API_DEPRECATED(30);